:root {
  --bg: #f5efe6;
  --text: #111111;
  --muted: #4b463f;
  --accent: #8d5e2a;
  --panel: rgba(255, 255, 255, 0.72);
  --border: rgba(17, 17, 17, 0.16);
  --topbar-h: 4.2rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

button,
.button {
  transition: all 180ms ease;
}

.split-layout {
  display: grid;
  grid-template-columns: 50% 50%;
  min-height: calc(100vh - var(--topbar-h));
}

.image-column {
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.16)),
    url("../images/cover.jpg") center/cover no-repeat;
  min-height: calc(100vh - var(--topbar-h));
  background-size: cover;
  background-position: right center;
}

body.no-topbar {
  --topbar-h: 0rem;
}

.content-column {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.title-stack {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.vertical-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(3rem, 5vw, 4.4rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: #111111;
  text-transform: uppercase;
}

.signature {
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 1.35rem;
  color: #111111;
  text-decoration: none;
  letter-spacing: 0.12em;
  margin-bottom: 0.15em;
}

.signature:hover,
.signature:focus-visible {
  text-decoration: underline;
}

.signature-arrow {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-style: normal;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  height: var(--topbar-h);
  padding: 0 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-sep {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: 0.2rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 0.82rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  transition: transform 160ms ease, color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  transform: translateY(-3px);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--text);
  border-bottom: 1px solid var(--text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 0.2rem;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

.hero {
  padding: 2rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60vh;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8d5e2a;
  margin-bottom: 0.8rem;
}

.hero h1,
.section h2,
.section h3 {
  margin: 0 0 0.8rem;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  max-width: 620px;
  margin-bottom: 1rem;
}

.lead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

main {
  padding: 0 1.5rem 1.5rem;
}

.section {
  padding: 1rem 0 2rem;
}

.section-heading {
  margin-bottom: 1.25rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  padding: 1.3rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
  backdrop-filter: blur(6px);
}

.split-section {
  display: grid;
  grid-template-columns: 1.05fr 0.75fr;
  gap: 2rem;
  padding: 1rem 0 2rem;
}

footer {
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.projects-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  background: #ffffff;
}

.projects-heading {
  text-align: center;
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 1rem 0 2.5rem;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 3rem 0;
}

.project-grid-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.project-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background: #111111;
  cursor: pointer;
  overflow: hidden;
}

.project-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.project-tile:hover img,
.project-tile:focus-visible img {
  transform: scale(1.04);
}

.project-tile img.project-tile-titlemark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 60%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.back-link {
  display: inline-block;
  margin: 0 0 2rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

/* Series page: shared image + caption building blocks */
.series-block {
  margin: 0 0 4rem;
}

.series-image {
  position: relative;
  overflow: hidden;
  background: #111111;
}

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

.series-image img.series-title-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 60%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.series-subtitle {
  max-width: 720px;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.series-subtitle h3,
.series-subtitle h4,
.series-subtitle h5,
.series-subtitle h6 {
  color: var(--text);
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 400;
  margin: 1.2rem 0 0.5rem;
}

.series-subtitle p {
  margin: 0 0 1rem;
}

.series-subtitle a {
  color: var(--accent);
}

/* Slideshow (series 01) */
.series-slideshow .carousel {
  position: relative;
}

.series-slideshow .carousel-inner {
  position: relative;
}

.series-slideshow .carousel-item {
  display: none;
}

.series-slideshow .carousel-item.active {
  display: block;
}

.series-slideshow .series-image {
  aspect-ratio: 16 / 10;
}

.series-slideshow .carousel-control-prev,
.series-slideshow .carousel-control-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  border: 0;
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  z-index: 2;
}

.series-slideshow .carousel-control-prev {
  left: 0.75rem;
}

.series-slideshow .carousel-control-next {
  right: 0.75rem;
}

/* Alternating rows (series 02): a single shared intro, then images
   alternating left/right for visual rhythm. */
.series-intro {
  max-width: 720px;
  margin: 0 auto 3rem;
}

.alt-row {
  display: flex;
  margin-bottom: 2rem;
}

.alt-row .alt-image {
  width: 65%;
}

.alt-row.reverse {
  justify-content: flex-end;
}

/* Masonry (series 03 and beyond) */
.masonry-grid {
  column-count: 2;
  column-gap: 1.5rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

.masonry-item:only-child {
  column-span: all;
}

.masonry-item:only-child .series-image {
  background: none;
}

.masonry-item img {
  width: 100%;
  height: auto;
}

.series-masonry .series-subtitle {
  margin: 2rem auto 0;
}

@media (max-width: 760px) {
  .projects-page {
    padding: 2rem 1.2rem 3rem;
  }

  .project-grid-overview {
    gap: 0.25rem;
  }

  .alt-row .alt-image {
    width: 100%;
  }

  .masonry-grid {
    column-count: 1;
  }

  .split-layout {
    grid-template-columns: 1fr;
  }

  .image-column {
    min-height: 42vh;
  }

  .content-column {
    padding: 1.5rem;
  }

  .vertical-title {
    font-size: 2.1rem;
    letter-spacing: 0.16em;
  }

  .signature {
    font-size: 1.05rem;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav-sep {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--topbar-h);
    right: 1.5rem;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(17, 17, 17, 0.08);
  }

  .nav-links.active {
    display: flex;
  }

  .project-grid,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}
