:root {
  --bg: #ffffff;
  --ink: #1a1d21;
  --ink-soft: #50596a;
  --slate-50: #f8fafc;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-700: #334155;
}

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

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Funnel Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

.home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding: clamp(2rem, 6vw, 6rem);
  max-width: 1400px;
  margin: 0 auto;
}

.headline {
  font-family: "Funnel Sans", sans-serif;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.line {
  display: block;
  line-height: 0.95;
}

.line-small {
  font-size: clamp(1.25rem, 2.25vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.phrase {
  display: inline-block;
  white-space: nowrap;
}

.rotator {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  perspective: 800px;
  color: var(--ink);
  font-weight: inherit;
  line-height: 1;
}

.rotator-sizer {
  display: inline-block;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  transition: width 800ms cubic-bezier(0.65, 0, 0.35, 1);
}

.rotator-word {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-block;
  white-space: nowrap;
  color: var(--ink-soft);
  font-weight: inherit;
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  transition: transform 800ms cubic-bezier(0.65, 0, 0.35, 1),
              opacity 800ms cubic-bezier(0.65, 0, 0.35, 1);
}

.rotator-word.is-current {
  transform: rotateX(0deg) translateY(0);
  opacity: 1;
}

.rotator-up .rotator-word.is-exit {
  transform: rotateX(90deg) translateY(-0.5em);
  opacity: 0;
}

.rotator-up .rotator-word.is-enter {
  transform: rotateX(-90deg) translateY(0.5em);
  opacity: 0;
}

.rotator-down .rotator-word.is-exit {
  transform: rotateX(-90deg) translateY(0.5em);
  opacity: 0;
}

.rotator-down .rotator-word.is-enter {
  transform: rotateX(90deg) translateY(-0.5em);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .rotator-word {
    transition: opacity 200ms ease;
  }
  .rotator-up .rotator-word.is-exit,
  .rotator-up .rotator-word.is-enter,
  .rotator-down .rotator-word.is-exit,
  .rotator-down .rotator-word.is-enter {
    transform: none;
  }
}

.line-big {
  font-size: clamp(4rem, 13vw, 11rem);
  font-weight: 700;
  letter-spacing: -0.05em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.nav-btn {
  font-family: inherit;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  background: var(--bg);
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease,
    transform 200ms ease;
}

.nav-btn:hover,
.nav-btn:focus-visible {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  transform: translateY(-1px);
}

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

.about {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
  padding: clamp(2rem, 6vw, 6rem);
  max-width: 1400px;
  margin: 0 auto;
}

.back {
  font-family: inherit;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  text-decoration: none;
  align-self: flex-start;
  transition: color 200ms ease;
}

.back:hover,
.back:focus-visible {
  color: var(--ink);
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.25em;
  max-width: 70ch;
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.photos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.photos-title {
  font-family: inherit;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

.marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: marquee 60s linear infinite;
}

.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track,
.marquee:active .marquee-track {
  animation-play-state: paused;
}

.marquee-track img {
  height: clamp(180px, 28vw, 320px);
  width: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

.work {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 6vw, 5rem);
  padding: clamp(2.5rem, 8vw, 8rem);
  max-width: 1400px;
  margin: 0 auto;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(3rem, 6vw, 5rem);
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.work-card > .work-title {
  margin-top: 0.25rem;
}

.work-card > .work-desc {
  margin-top: -0.5rem;
}

.work-thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
  background: var(--slate-200);
  border-radius: 12px;
}

.work-title {
  font-family: inherit;
  font-size: clamp(1.25rem, 1.75vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.work-desc {
  font-size: clamp(1rem, 1.15vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  max-width: 50ch;
}

@media (max-width: 720px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .headline {
    gap: 0.15em 0.3em;
  }
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-btn {
    width: 100%;
    text-align: center;
  }
  .marquee-track img {
    height: 200px;
  }
}
