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

:root {
  --bg: #ede8e2;
  --text: #1a1a1a;
  --red: #d42020;
  --max-width: 1200px;
  --side-pad: 5%;
}

/* === Selection color === */

::selection {
  background: var(--red);
  color: #fff;
}

/* === Subtle page fade-in === */

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

/* === Base Typography === */

body {
  font-family: "Libre Bodoni", Georgia, "Times New Roman", Times, serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, nav {
  font-family: "Jost", "Futura", "Century Gothic", sans-serif;
}

img {
  image-rendering: auto;
}

/* ---- Header / Nav ---- */

header {
  padding: 2rem var(--side-pad) 0;
  max-width: calc(var(--max-width) + 10%);
  margin: 0 auto;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.site-name {
  font-family: "Libre Bodoni", Georgia, "Times New Roman", Times, serif;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--red);
  text-decoration: none;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.site-name:hover {
  opacity: 0.8;
}

nav ul {
  display: flex;
  justify-content: flex-end;
  gap: 2.5rem;
  list-style: none;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--red);
}

nav a:hover,
nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

header hr {
  border: none;
  height: 6px;
  background: var(--red);
  margin-top: 1.25rem;
}

/* ---- Main ---- */

main {
  flex: 1;
  max-width: calc(var(--max-width) + 10%);
  margin: 0 auto;
  padding: 2.5rem var(--side-pad) 1.5rem;
  width: 100%;
  animation: fadeIn 0.5s ease both;
}

/* ---- Landing page ---- */

.landing {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 3rem;
  align-items: center;
}

.landing-text p {
  font-size: 1.25rem;
  line-height: 1.6;
}

.landing-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Portfolio page ---- */

.portfolio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.portfolio-section h2 {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  letter-spacing: 0.01em;
}

.portfolio-section img {
  width: 100%;
  height: auto;
  display: block;
  border: 8px solid #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-section img:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* ---- Portfolio Gallery (item list within a category) ---- */

.portfolio-gallery {
  animation: fadeIn 0.3s ease both;
}

.gallery-back {
  display: inline-block;
  font-family: "Jost", "Futura", "Century Gothic", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.gallery-back:hover {
  color: var(--red);
}

.gallery-title {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.gallery-item {
  break-inside: avoid;
}

.gallery-item[data-group-hidden] {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border: 6px solid #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.gallery-item figcaption {
  font-family: "Jost", "Futura", "Century Gothic", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  text-align: center;
  margin-top: 0.5rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* ---- Lightbox overlay ---- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 82vw;
  max-height: 80vh;
  object-fit: contain;
  pointer-events: none;
}

.lightbox-footer {
  text-align: center;
  margin-top: 1rem;
  pointer-events: none;
}

.lightbox-caption {
  color: #fff;
  font-family: "Jost", "Futura", "Century Gothic", sans-serif;
  font-size: 1rem;
  text-align: center;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.6);
  font-family: "Jost", "Futura", "Century Gothic", sans-serif;
  font-size: 0.85rem;
  margin-top: 0.3rem;
  text-align: center;
  letter-spacing: 0.08em;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 1001;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  z-index: 1001;
  padding: 1rem 0.75rem;
  -webkit-user-select: none;
  user-select: none;
}

.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }

.lightbox-prev:hover,
.lightbox-prev:focus-visible,
.lightbox-next:hover,
.lightbox-next:focus-visible {
  opacity: 1;
}

/* ---- Statement page ---- */

.statement {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.statement-text {
  font-size: 1.1rem;
  line-height: 1.7;
  font-style: italic;
}

.statement-text p + p {
  margin-top: 1.5rem;
}

.statement-text .signature {
  margin-top: 1.5rem;
  padding-left: 2rem;
  font-style: normal;
}

.statement-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Contact page ---- */

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-text {
  font-size: 1.1rem;
  line-height: 1.7;
  font-style: italic;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.contact-item a,
.contact-item p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-item a:hover {
  color: var(--red);
}

/* ---- Footer ---- */

footer {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

footer a {
  color: var(--text);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

footer a:hover {
  color: var(--red);
  transform: scale(1.1);
}

/* ---- Responsive ---- */

@media (max-width: 700px) {
  .landing,
  .portfolio,
  .statement,
  .contact {
    grid-template-columns: 1fr;
  }

  .landing {
    gap: 2rem;
  }

  .landing-image {
    order: -1;
  }

  .landing-text p {
    font-size: 1.1rem;
  }

  .portfolio {
    gap: 2.5rem;
  }

.portfolio-section {
  text-decoration: none;
  color: var(--text);
  display: block;
}

.portfolio-section h2 {
    font-size: 1.6rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .gallery-title {
    font-size: 1.6rem;
  }

  .statement-text {
    font-size: 1rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .site-name {
    font-size: 1.35rem;
  }

  nav ul {
    justify-content: center;
    gap: 1.5rem;
  }

  nav a {
    font-size: 1rem;
  }

  main {
    padding-top: 1.75rem;
  }
}
