/* ---------- Theme: change these to restyle the whole site ---------- */
:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --accent: #1a1a1a;
  --max: 1400px;
  --gutter: 28px;
  --pad: clamp(20px, 4vw, 60px);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.site-header {
  max-width: var(--max); margin: 0 auto;
  padding: 44px var(--pad) 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav .pages { display: flex; gap: 26px; font-size: 15px; }
.nav .pages a { color: var(--muted); transition: color .2s; }
.nav .pages a:hover, .nav .pages a.active { color: var(--text); }

.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.social a { display: grid; place-items: center; width: 32px; height: 32px; color: var(--muted); transition: color .2s; }
.social a:hover { color: var(--text); }
.icon { width: 20px; height: 20px; fill: currentColor; }

.hamburger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.hamburger i { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .25s, opacity .25s; }

/* ---------- Main ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); min-height: 60vh; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.masthead { max-width: 760px; padding: 10px 0 56px; }
.masthead h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.15; margin: 0 0 16px; font-weight: 700; letter-spacing: -0.015em; }
.masthead p { margin: 0; font-size: 18px; color: #3a3a3a; }

/* ---------- Project grid ---------- */
.project-covers {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 48px var(--gutter);
}
.project-cover { display: block; }
.cover-image { position: relative; aspect-ratio: 1.28 / 1; overflow: hidden; background: #f2f2f2; }
.cover { position: absolute; inset: 0; transition: opacity .45s ease, transform .6s ease; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-rollover { opacity: 0; }
.project-cover.has-rollover:hover .cover-rollover { opacity: 1; }
.project-cover:not(.has-rollover):hover .cover-normal { transform: scale(1.04); }

.cover-ph { width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; text-align: center; }
.cover-ph span { font-weight: 700; font-size: clamp(18px, 1.8vw, 26px); letter-spacing: -0.01em; }

.details { padding-top: 14px; }
.details .title { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.details .meta { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------- Project page ---------- */
.project { max-width: 1100px; margin: 0 auto; }
.project-header { text-align: center; padding: 10px 0 44px; }
.project-header h1 { font-size: clamp(32px, 4.5vw, 54px); line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.02em; }
.project-meta { color: var(--muted); font-size: 15px; }
.project-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.btn { display: inline-block; padding: 10px 20px; border: 1.5px solid var(--accent); font-size: 14px; font-weight: 500; transition: background .2s, color .2s; }
.btn:hover { background: var(--accent); color: var(--bg); }

.project-blocks > * { margin: 0 0 40px; }
.block-heading { font-size: 24px; margin-bottom: 14px !important; text-align: center; letter-spacing: -0.01em; }
.block-text { max-width: 720px; margin-left: auto !important; margin-right: auto !important; font-size: 17px; }
.block-text p { margin: 0 0 1em; }
.block-image img { width: 100%; }
figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 10px; }
.block-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.block-gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.block-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.block-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.block-video.file { aspect-ratio: auto; }
.block-video video { width: 100%; }
.block-embed iframe { width: 100%; border: 0; }

.project-nav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 20px; font-size: 15px; color: var(--muted); }
.project-nav a:hover { color: var(--text); }
.project-nav a:nth-child(2) { text-align: center; }
.project-nav a:last-child { text-align: right; }

/* ---------- Footer ---------- */
.site-footer { max-width: var(--max); margin: 0 auto; padding: 90px var(--pad) 60px; text-align: center; }
.site-footer .social { justify-content: center; margin-bottom: 10px; }
.footer-text { color: var(--muted); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .project-covers { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .site-header { padding-top: 28px; padding-bottom: 28px; position: relative; }
  .hamburger { display: block; z-index: 20; }
  .nav {
    position: fixed; inset: 0; z-index: 10; background: var(--bg);
    flex-direction: column; justify-content: center; gap: 36px;
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .nav .pages { flex-direction: column; align-items: center; gap: 18px; font-size: 24px; }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav { opacity: 1; pointer-events: auto; }
  body.nav-open .hamburger { position: fixed; right: var(--pad); top: 28px; }
  body.nav-open .hamburger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .hamburger i:nth-child(2) { opacity: 0; }
  body.nav-open .hamburger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 540px) {
  .project-covers { grid-template-columns: 1fr; gap: 40px; }
  .masthead p { font-size: 17px; }
  .project-nav { flex-direction: column; text-align: center; }
  .project-nav a:last-child { text-align: center; }
}
