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

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --mid: #999;
  --font: 'Nunito', sans-serif;
  --header-h: 56px;
}

html, body {
  height: 100%;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ─── Header ─── */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: var(--header-h);
  border-bottom: 1px solid #ebebeb;
}

.site-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.main-nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 18px;
  font-weight: 600;
  color: var(--mid);
  transition: color 0.1s;
}

.nav-link:hover, .nav-link.active { color: var(--black); }

/* ─── Views ─── */

.view { display: none; padding-top: var(--header-h); }
.view.active { display: block; }

/* ─── Index grid ─── */

.index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #e0e0e0;
  border-top: 1px solid #e0e0e0;
}

.index-item {
  background: var(--white);
  cursor: pointer;
}

.index-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #f0f0f0;
}

.index-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.index-item:hover .index-thumb img { transform: scale(1.03); }

.index-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px 14px;
}

.index-title { font-size: 14px; font-weight: 600; }
.index-year  { font-size: 14px; font-weight: 400; color: var(--mid); }

/* ─── Project detail ─── */

.project-header {
  display: flex;
  align-items: baseline;
  gap: 28px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #ebebeb;
}

.back-btn {
  font-size: 16px;
  font-weight: 600;
  color: var(--mid);
  white-space: nowrap;
  transition: color 0.1s;
  padding: 0;
}

.back-btn:hover { color: var(--black); }

.project-title-block { display: flex; align-items: baseline; gap: 16px; }
.proj-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.proj-meta  { font-size: 14px; font-weight: 400; color: var(--mid); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #e0e0e0;
  border-top: 1px solid #e0e0e0;
}

.proj-item {
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
}

.proj-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3/4;
  display: block;
  transition: transform 0.4s ease;
}

.proj-item:hover img { transform: scale(1.03); }

/* ─── Info / Contact ─── */

.text-view { padding: 36px 20px; max-width: 640px; }

.info-block { margin-bottom: 40px; }

.info-body {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 14px;
}

.info-clients { border-top: 1px solid #e0e0e0; padding-top: 20px; }

.info-label, .contact-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mid);
  margin-bottom: 6px;
}

.info-clients p { font-size: 15px; font-weight: 400; line-height: 1.6; }

.contact-list { display: flex; flex-direction: column; }

.contact-item {
  padding: 16px 0;
  border-bottom: 1px solid #ebebeb;
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: baseline;
  gap: 16px;
}

.contact-item a { font-size: 17px; font-weight: 600; }
.contact-item a:hover { text-decoration: underline; }

/* ─── PhotoSwipe overrides ─── */

.pswp__bg { background: #080808; }

.pswp__img { object-fit: contain; }

/* Caption bar at bottom */
.pswp-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 24px 18px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font);
  pointer-events: none;
  z-index: 10;
}

.pswp-cap-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.pswp-cap-detail {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
}
