:root {
  color-scheme: light;
  --ink: #17221d;
  --muted: #637068;
  --paper: #f4f1e9;
  --card: #fffdf8;
  --line: #d9dbd0;
  --green: #b9f078;
  --orange: #ff754c;
  --dark-green: #223c31;
  --radius: 1.4rem;
  --shadow: 0 1rem 3rem rgba(31, 49, 40, 0.09);
  --shell: min(74rem, calc(100% - 2rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.hero {
  position: relative;
  min-height: min(48rem, 92svh);
  overflow: hidden;
  background: var(--dark-green);
  color: #f8f5ed;
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 34rem;
  height: 34rem;
  right: -10rem;
  top: 6rem;
  border: 1px solid rgba(185, 240, 120, 0.32);
  box-shadow: 0 0 0 5rem rgba(185, 240, 120, 0.045), 0 0 0 10rem rgba(185, 240, 120, 0.025);
}

.hero::after {
  width: 13rem;
  height: 13rem;
  right: 8%;
  bottom: -7rem;
  background: var(--orange);
  filter: blur(1px);
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--dark-green);
  font-size: 0.75rem;
  letter-spacing: -0.02em;
}

.back-link {
  color: rgba(255, 255, 255, 0.72);
  transition: color 160ms ease, transform 160ms ease;
}

.back-link:hover {
  color: #fff;
  transform: translateX(-0.2rem);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: calc(min(48rem, 92svh) - 5.5rem);
  padding-block: 4rem 6rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: #547062;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--green);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 15ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3.2rem, 8.5vw, 7.4rem);
}

h1 em {
  color: var(--green);
  font-weight: inherit;
}

.intro {
  max-width: 46rem;
  margin-bottom: 2rem;
  color: rgba(248, 245, 237, 0.72);
  font-size: clamp(1.02rem, 1.8vw, 1.24rem);
}

.scroll-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--green);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.scroll-link span {
  color: var(--green);
}

.projects-section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter {
  padding: 0.65rem 1rem;
  border: 1px solid #cbd0c7;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.filter:hover,
.filter.is-active {
  border-color: var(--dark-green);
  background: var(--dark-green);
  color: white;
}

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

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 0 0 rgba(31, 49, 40, 0);
  transition: transform 200ms ease, box-shadow 200ms ease, opacity 180ms ease;
}

.project-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow);
}

.project-card[hidden] {
  display: none;
}

.project-card:nth-child(5n + 2) {
  background: #f0f5e9;
}

.project-card:nth-child(7n) {
  background: #fff7ef;
}

.card-content {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.3rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-meta span:first-child {
  position: relative;
  padding-left: 0.85rem;
}

.card-meta span:first-child::before {
  position: absolute;
  top: 0.52em;
  left: 0;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--orange);
  content: "";
}

[data-type="personal"] .card-meta span:first-child::before {
  background: #63a32f;
}

.project-card h3 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
}

.project-card p {
  margin-bottom: 0.85rem;
  color: #536159;
  font-size: 0.95rem;
}

.project-card p:last-child {
  margin-bottom: 0;
}

.project-card p a {
  text-decoration-color: #8ca47f;
  text-underline-offset: 0.18em;
}

.text-card {
  position: relative;
  min-height: 18rem;
}

.text-card::after {
  position: absolute;
  right: -2.3rem;
  bottom: -2.3rem;
  width: 7rem;
  height: 7rem;
  border: 1px solid rgba(34, 60, 49, 0.16);
  border-radius: 50%;
  content: "";
}

.media-button {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(13rem, 28vw, 19rem);
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #dfe3dc;
  cursor: zoom-in;
}

.media-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 450ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 200ms ease;
}

.portrait-media img {
  object-position: center 18%;
}

.media-button:hover img {
  transform: scale(1.025);
  filter: brightness(0.82);
}

.zoom-hint {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(20, 31, 26, 0.86);
  color: white;
  font-size: 0.7rem;
  font-weight: 750;
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.media-button:hover .zoom-hint,
.media-button:focus-visible .zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.media-gallery {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0.2rem;
  background: #fff;
}

.media-gallery .media-button {
  height: clamp(13rem, 28vw, 19rem);
}

.status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem !important;
  font-style: italic;
}

.status span {
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6cad37;
  box-shadow: 0 0 0 0.2rem rgba(108, 173, 55, 0.18);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  color: var(--dark-green);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.site-footer {
  padding-block: 3.5rem;
  background: #172a22;
  color: rgba(255, 255, 255, 0.65);
}

.footer-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
}

.site-footer p:last-child {
  text-align: right;
}

.site-footer strong {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 500;
}

.lightbox {
  width: min(92vw, 86rem);
  max-width: none;
  max-height: 92vh;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: white;
}

.lightbox::backdrop {
  background: rgba(11, 17, 14, 0.92);
  backdrop-filter: blur(0.45rem);
}

.lightbox img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 82vh;
  margin-inline: auto;
  border-radius: 0.6rem;
  box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.45);
}

.lightbox p {
  margin: 0.8rem 0 0;
  text-align: center;
  font-size: 0.82rem;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  z-index: 2;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(20, 30, 25, 0.7);
  color: white;
  cursor: pointer;
  font: 300 1.7rem/1 sans-serif;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

@media (max-width: 48rem) {
  :root {
    --shell: min(100% - 1.25rem, 40rem);
  }

  .hero {
    min-height: auto;
  }

  .hero::before {
    right: -23rem;
  }

  .hero-content {
    min-height: auto;
    padding-block: 5rem 6rem;
  }

  .back-link {
    font-size: 0;
  }

  .back-link span {
    font-size: 1.25rem;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .media-button,
  .media-gallery .media-button {
    height: clamp(14rem, 65vw, 24rem);
  }

  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

  .site-footer p:last-child {
    text-align: left;
  }
}

@media (max-width: 28rem) {
  .filters {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .filter {
    padding-inline: 0.6rem;
  }

  .media-gallery {
    grid-template-columns: 1fr;
  }

  .media-gallery .media-button {
    height: 15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
