@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Source+Serif+4:wght@600&display=swap");

:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --border: #dfe4ef;
  --border-dark: #5c677f;
  --text: #12131a;
  --muted: #4f5665;
  --accent: #0f1c3d;
  --accent-2: #2c6cb0;
  --link: #1a4d7a;
  --link-hover: #0f3c63;
  --highlight: #ebf1fa;
  --tint: #eef4fa;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
  line-height: 1.6;
}

.page {
  max-width: 960px;
  margin: 24px auto 48px;
  padding: 0 18px;
}

.header {
  border-bottom: 1px solid var(--border);
  padding: 26px 16px 22px;
  text-align: center;
}

.header h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: 1px;
  font-weight: 600;
}

.header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.nav {
  margin-top: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 20px;
  box-shadow: 0 12px 20px rgba(20, 28, 40, 0.08);
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
}

.nav a {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.nav a:hover {
  border-color: var(--border-dark);
  border-radius: 999px;
}

.nav a[aria-current="page"] {
  border-color: var(--accent);
  border-radius: 999px;
  font-weight: 600;
}

.main {
  margin-top: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(15, 28, 44, 0.06);
}

.section-title {
  margin: 0 0 10px;
  font-size: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  font-family: "Source Serif 4", "Georgia", serif;
  color: var(--accent);
  font-weight: 600;
}

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

.card {
  border: 1px solid rgba(20, 28, 40, 0.1);
  background: #ffffff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.button {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid var(--border-dark);
  background: var(--accent-2);
  color: var(--highlight);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: 6px;
}

.button.alt {
  background: transparent;
  border-color: var(--accent-2);
  color: var(--accent-2);
  font-weight: 600;
  border-radius: 6px;
}

.button.cool {
  background: transparent;
  border-color: #4c5b73;
  color: #4c5b73;
  font-weight: 600;
  border-radius: 6px;
}

.button:visited {
  color: #ffffff);
}

.button:hover {
  background: var(--tint);
  color: var(--text);
}

.button:visited:hover {
  color: var(--text);
}

.button.alt:hover {
  background: var(--tint);
}

.button.cool:hover {
  background: var(--tint);
}

.list {
  margin: 0;
  padding-left: 18px;
}

.list li {
  margin-bottom: 6px;
}

.footer {
  margin-top: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left;
}

.table th {
  background: #f7f8fb;
}

.note {
  background: #f8fafc;
  border: 1px solid var(--highlight);
  padding: 10px;
  font-size: 13px;
  color: var(--muted);
}

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

.album-card {
  border: 1px solid rgba(20, 28, 40, 0.1);
  padding: 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 230px;
}

.album-card h3 {
  margin: 0;
  font-size: 16px;
}

.album-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.album-card .button-row {
  margin-top: auto;
}

.photo-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.photo-tile {
  border: 1px solid rgba(20, 28, 40, 0.1);
  border-radius: 6px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(20, 28, 40, 0.15);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.photo-tile:hover {
  border-color: var(--accent);
}

.photo-tile img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 4px;
}

.photo-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 20, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 8px;
  max-width: 900px;
  width: min(94vw, 900px);
  padding: 32px 42px;
  box-shadow: 0 18px 30px rgba(15, 28, 44, 0.25);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-image {
  width: 100%;
  height: auto;
  max-height: 80%;
  border-radius: 6px;
  object-fit: contain;
  margin-top: 18px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.photo-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--highlight);
  color: var(--accent);
  font-size: 12px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.pagination {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.pagination a {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--accent);
  font-size: 13px;
}

.pagination a.active {
  border-color: var(--accent);
  font-weight: 600;
  background: var(--highlight);
}

.project-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-item {
  border: 1px solid rgba(20, 28, 40, 0.2);
  padding: 14px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-item a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.project-meta {
  font-size: 13px;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.project-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-detail input,
.project-detail textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
}

.project-detail label {
  font-size: 13px;
  color: var(--muted);
}

.links a {
  color: var(--link);
}

.links a:hover {
  color: var(--link-hover);
}

@media (max-width: 620px) {
  .header h1 {
    font-size: 22px;
  }

  .nav ul {
    justify-content: flex-start;
  }
}
