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

html {
  font-size: 16px;
}

body {
  font-family: sans-serif;
  color: #000;
  background: #fff;
}

/* Sidebar */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 170px;
  padding: 35px 35px 100px 35px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  z-index: 100;
}

.site-title {
  display: block;
  font-size: 18px;
  line-height: 1;
  color: #000;
  text-decoration: none;
  margin-bottom: 20px;
}

.sidebar ul {
  list-style: none;
  margin-bottom: 24px;
}

.sidebar ul li + li {
  margin-top: 6px;
}

.sidebar a {
  color: #000;
  text-decoration: none;
  font-size: 16px;
}

.sidebar a:hover {
  color: #0066ff;
}

.lang-toggle {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.lang-toggle button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 16px;
  color: #999;
  padding: 0;
}

.lang-toggle button.active {
  color: #000;
}

/* Main content */

main {
  margin-left: 252px;
  padding: 35px 45px 60px 0;
}

/* Language toggle logic */

body[data-lang="en"] [lang="fr"] { display: none; }
body[data-lang="fr"] [lang="en"] { display: none; }

/* Home grid */

.project-grid {
  /* layout handled by Masonry.js */
}

.grid-sizer,
.project-thumb {
  width: calc(33.333% - 16px);
  margin-bottom: 24px;
}

.project-thumb {
  display: block;
  text-decoration: none;
  color: #000;
}

.project-thumb img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 8px;
}

.project-thumb-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eee;
  margin-bottom: 8px;
}

.project-thumb-title {
  font-size: 14px;
  color: #666;
}

.project-thumb:hover .project-thumb-title {
  color: #0066ff;
}

/* Project page */

.project-header {
  margin-bottom: 24px;
}

.project-header h1 {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: normal;
  margin-bottom: 6px;
}

.project-date {
  font-size: 15px;
  color: #666;
  margin-bottom: 4px;
}

.project-tags {
  font-size: 14px;
  color: #999;
}

.project-body {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
  max-width: 640px;
}

.project-body p {
  margin-bottom: 1em;
}

.project-body a {
  color: #0066ff;
}

.project-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em 0;
}

.project-body h2,
.project-body h3 {
  font-family: sans-serif;
  font-weight: normal;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666;
  margin: 1.5em 0 0.5em;
}

/* Biography / Contact */

.page-body {
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.7;
  max-width: 640px;
}

.page-body p {
  margin-bottom: 1em;
}

.page-body a {
  color: #0066ff;
}

.page-body h2 {
  font-family: sans-serif;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666;
  margin: 2em 0 0.75em;
}

.contact-photo {
  max-width: 275px;
  height: auto;
  display: block;
  margin-bottom: 24px;
}

/* Mobile */

@media (max-width: 768px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: baseline;
    gap: 24px;
  }

  .sidebar ul {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
  }

  .lang-toggle {
    margin-top: 0;
    margin-left: auto;
  }

  main {
    margin-left: 0;
    padding: 24px;
  }

  .grid-sizer,
  .project-thumb {
    width: calc(50% - 12px);
  }
}

@media (max-width: 480px) {
  .grid-sizer,
  .project-thumb {
    width: 100%;
  }
}
