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

:root {
  --bg: #faf9f7;
  --text: #1a1a18;
  --text-muted: #888880;
  --font: 'Urbanist', sans-serif;
  --header-height: 64px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Header */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: var(--bg);
  z-index: 100;
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.site-name {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1;
}

.site-name a:hover {
  opacity: 0.6;
  transition: opacity 0.2s;
}

nav {
  display: flex;
  gap: 2.5rem;
}

nav a {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--text);
}

/* Main */

main {
  margin-top: var(--header-height);
  flex: 1;
}

/* Masonry grid */

.masonry {
  columns: 3;
  column-gap: 20px;
  padding: 20px;
}

@media (max-width: 900px) {
  .masonry {
    columns: 2;
  }
}

@media (max-width: 560px) {
  .masonry {
    columns: 1;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.masonry-item:hover img {
  transform: scale(1.015);
}

/* About page */

.about-page {
  padding: 5rem 2.5rem 4rem;
}

.about-content {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 5rem;
  align-items: start;
}

@media (max-width: 700px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.about-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 1.4rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* Contact page */

.contact-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - 48px);
}

.email-link {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text);
  border-bottom: 0.5px solid var(--text);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.email-link:hover {
  opacity: 0.5;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(250, 249, 247, 0.96);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 88vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: var(--text);
}

/* Footer */

footer {
  padding: 1.2rem 2.5rem;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-muted);
  border-top: 0.5px solid rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer a {
  color: var(--text-muted);
  transition: color 0.2s;
}

footer a:hover {
  color: var(--text);
}

/* Page fade in */

main {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
