:root {
  --page-background: #f7f8f6;
  --surface: #ffffff;
  --text: #171a17;
  --muted: #535b54;
  --accent: #6f8f7b;
  --accent-dark: #557260;
  --frame-border: rgba(62, 77, 66, 0.16);
  --frame-shadow: 0 18px 46px rgba(36, 46, 38, 0.08);
  --header-gap: 56px;
  --content-width: min(calc(100% - 72px), 1180px);
  --gallery-width: min(calc(100% - 72px), 1240px);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page-background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  line-height: 1.35;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
}

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

figure {
  margin: 0;
}

button {
  font: inherit;
}

.site-header {
  padding: 50px 0 54px;
  text-align: center;
}

.site-title {
  display: inline-block;
  font-size: 32px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 22px;
}

.nav-link {
  border-bottom: 1px solid transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  padding-bottom: 6px;
  text-decoration: none;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link[aria-current="page"] {
  border-bottom-color: currentColor;
}

.page-shell {
  width: 100%;
}

.home-intro {
  align-items: center;
  column-gap: clamp(60px, 12vw, 130px);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 43%);
  margin: 0 auto;
  min-height: 500px;
  width: var(--content-width);
}

.intro-copy {
  align-self: start;
  padding-top: 130px;
}

.intro-copy h1 {
  font-size: clamp(44px, 5.6vw, 68px);
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  white-space: nowrap;
}

.intro-copy p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  margin: 28px 0 0;
}

.portrait-frame {
  background: var(--surface);
  border: 1px solid var(--frame-border);
  border-radius: 8px;
  box-shadow: var(--frame-shadow);
  justify-self: end;
  padding: clamp(8px, 1.1vw, 13px);
  overflow: hidden;
  width: min(100%, 470px);
}

.portrait-frame img {
  border-radius: 5px;
  height: auto;
  width: 100%;
}

.home-statement {
  font-size: clamp(38px, 5.4vw, 58px);
  font-weight: 500;
  line-height: 1.12;
  margin: clamp(108px, 16vw, 150px) auto 0;
  text-align: center;
}

.home-carousel {
  margin-top: clamp(140px, 20vw, 210px);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.carousel-viewport {
  overflow-x: auto;
  scrollbar-width: none;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  align-items: center;
  display: flex;
  gap: 24px;
  min-width: max-content;
  padding: 0 36px;
}

.carousel-item {
  background: var(--surface);
  border: 1px solid var(--frame-border);
  border-radius: 8px;
  box-shadow: var(--frame-shadow);
  flex: 0 0 clamp(260px, 34vw, 460px);
  overflow: hidden;
  padding: clamp(8px, 1vw, 12px);
}

.carousel-item img {
  border-radius: 5px;
  height: auto;
  max-height: 430px;
  object-fit: contain;
  width: 100%;
}

.carousel-button {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color 160ms ease, transform 160ms ease;
  width: 36px;
  z-index: 2;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  background: var(--accent-dark);
  transform: translateY(-50%) scale(1.04);
}

.carousel-button-prev {
  left: max(7vw, 42px);
}

.carousel-button-next {
  right: max(7vw, 42px);
}

.arrow-icon {
  height: 21px;
  width: 21px;
}

.skills-tools {
  display: grid;
  gap: clamp(56px, 12vw, 170px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 130px auto 210px;
  width: var(--content-width);
}

.detail-column h2 {
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  margin: 0 0 29px;
}

.detail-list {
  display: grid;
  gap: 19px;
}

.detail-item h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 5px;
}

.detail-item p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  margin: 0;
}

.studio-quote {
  font-size: clamp(30px, 3.7vw, 44px);
  font-weight: 500;
  line-height: 1.32;
  margin: 34px auto 0;
  max-width: 980px;
  text-align: center;
  width: min(calc(100% - 72px), 980px);
}

.studio-gallery {
  column-gap: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 56px auto 150px;
  width: var(--gallery-width);
}

.masonry-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.studio-photo {
  background: var(--surface);
  border: 1px solid var(--frame-border);
  border-radius: 8px;
  box-shadow: var(--frame-shadow);
  overflow: hidden;
  padding: clamp(8px, 1vw, 12px);
  width: 100%;
}

.studio-photo[data-frame="portrait"] {
  aspect-ratio: auto;
}

.studio-photo[data-frame="tall"] {
  aspect-ratio: auto;
}

.studio-photo[data-frame="square"] {
  aspect-ratio: auto;
}

.studio-photo[data-frame="landscape"] {
  aspect-ratio: auto;
}

.studio-photo[data-frame="wide"] {
  aspect-ratio: auto;
}

.studio-photo[data-frame="panorama"] {
  aspect-ratio: auto;
}

.studio-photo img {
  border-radius: 5px;
  height: auto;
  width: 100%;
}

@media (max-width: 760px) {
  :root {
    --content-width: min(calc(100% - 32px), 520px);
    --gallery-width: min(calc(100% - 32px), 520px);
  }

  .site-header {
    padding: 34px 0 42px;
  }

  .site-title {
    font-size: clamp(23px, 7.2vw, 32px);
  }

  .home-intro {
    grid-template-columns: 1fr;
    min-height: 0;
    row-gap: 42px;
  }

  .intro-copy {
    padding-top: 0;
  }

  .intro-copy h1 {
    white-space: normal;
  }

  .intro-copy p {
    margin-top: 22px;
  }

  .portrait-frame {
    justify-self: start;
    width: min(100%, 380px);
  }

  .home-statement {
    margin-top: 86px;
  }

  .home-carousel {
    margin-top: 96px;
  }

  .carousel-track {
    gap: 18px;
    padding: 0 16px;
  }

  .carousel-item {
    flex-basis: 78vw;
  }

  .carousel-button-prev {
    left: 28px;
  }

  .carousel-button-next {
    right: 28px;
  }

  .skills-tools {
    gap: 54px;
    grid-template-columns: 1fr;
    margin-bottom: 120px;
    margin-top: 90px;
  }

  .studio-quote {
    margin-top: 10px;
  }

  .studio-gallery {
    grid-template-columns: 1fr;
    margin-top: 36px;
    row-gap: 17px;
  }
}
