:root {
  --ink: #1c1a17;
  --paper: #faf8f5;
  --line: #dcd7cf;
  --muted: #8a8378;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.logo {
  display: block;
}

.logo-img {
  height: 20px;
  width: auto;
  display: block;
}

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

.main-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.social a { color: var(--muted); transition: color 0.2s ease; }
.social a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 1px;
  background: var(--ink);
  display: block;
}

/* Project list */

.project-list {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

.project-row {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.project-row:last-child { border-bottom: 1px solid var(--line); }

.row-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 20px;
}

.row-index {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.row-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.85rem;
  line-height: 1.15;
}

.row-tags {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.row-credit {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  margin-left: auto;
}

.row-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}

.row-strip img {
  height: 340px;
  width: auto;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.row-strip img:hover { opacity: 0.85; }

/* Lightbox */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.94);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 32px;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 48px 40px;
  font-size: 0.8rem;
  color: var(--muted);
}

.back-to-top:hover { color: var(--ink); }

/* Project page */

.project-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 48px 40px;
}

.project-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 56px;
}

.project-gallery img {
  width: 100%;
  height: auto;
  display: block;
}

.project-gallery img:nth-child(5n+1) {
  grid-column: 1 / -1;
}

.other-projects {
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.other-projects h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  margin: 0 0 28px;
}

.other-projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 20px;
}

.other-project {
  display: block;
}

.other-project img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  margin-bottom: 10px;
  transition: opacity 0.2s ease;
}

.other-project:hover img { opacity: 0.85; }

.other-project-title {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
}

.other-project-date {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .project-page { padding: 48px 24px 32px; }
  .project-gallery { grid-template-columns: 1fr; }
  .project-gallery img:nth-child(5n+1) { grid-column: auto; }
  .other-projects-grid { grid-template-columns: repeat(2, 1fr); }
}

/* About page */

.about {
  max-width: 560px;
  margin: 0 auto;
  padding: 120px 32px 100px;
  text-align: center;
}

.about-meta {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin: 0 0 40px;
  line-height: 1.7;
}

.about-statement {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.3;
  margin: 0 0 36px;
}

.about-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
}

@media (max-width: 640px) {
  .about { padding: 80px 24px 64px; }
}

/* Contact page */

.contact {
  max-width: 560px;
  margin: 0 auto;
  padding: 140px 32px 120px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.contact-email {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.contact-email:hover { color: var(--muted); }

.contact-instagram {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.contact-instagram:hover { color: var(--ink); }

@media (max-width: 640px) {
  .contact { padding: 90px 24px 72px; }
}

/* Responsive */

@media (max-width: 900px) {
  .project-list { padding: 0 24px; }
  .row-strip img { height: 240px; }
  .site-header { padding: 22px 24px; }
  .site-footer { padding: 22px 24px 32px; }
}

@media (max-width: 640px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 260px; }
  .main-nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
  }
  .social { display: none; }
  .nav-toggle { display: flex; }

  .row-header { flex-wrap: wrap; gap: 8px 16px; }
  .row-title { font-size: 1.5rem; }
  .row-tags { order: 3; }
  .row-credit { order: 4; margin-left: 0; flex-basis: 100%; }
  .row-strip img { height: 190px; }
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
