:root {
  --bg: #ffffff;
  --surface: #f8f8f8;
  --text: #111111;
  --muted: #707070;
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.22);
  --font-sans: "Instrument Sans", sans-serif;
  --page-width: min(1280px, calc(100% - 40px));
  --page-padding-bottom: 80px;
  --section-padding-top: 88px;
  --work-padding-top: 112px;
  --grid-gap-x: 40px;
  --grid-gap-y: 64px;
  --radius: 2px;
  --shadow-soft: 0 16px 40px rgba(17, 17, 17, 0.06);
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  letter-spacing: -0.015em;
}

body.contact-page {
  background: #e9ecfb;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page {
  width: var(--page-width);
  margin: 0 auto;
  padding: 24px 0 var(--page-padding-bottom);
}

/* Header */
.topbar,
.menu,
.section-head {
  display: flex;
}

.topbar {
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 4px 0;
}

.brand,
.menu {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.brand-logo {
  display: block;
  max-height: 28px;
  width: auto;
}

.menu {
  flex-wrap: wrap;
  gap: 22px;
  color: var(--muted);
}

.menu a[aria-current="page"] {
  color: var(--text);
}

.brand:hover,
.menu a:hover {
  opacity: 0.55;
}

.brand.has-logo .brand-text {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip: rect(0, 0, 0, 0);
}

/* Shared typography */
.eyebrow,
.detail-gallery-label,
.section-note,
.info-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}

.section-note {
  margin: 0;
  font-size: 0.74rem;
}

.page-title,
.detail-title,
.section-head h1,
.section-head h2,
.project-title {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.07em;
}

.page-title {
  font-size: clamp(3rem, 6.8vw, 5.8rem);
  line-height: 0.9;
}

.hero-copy,
.detail-summary,
.detail-overview {
  color: var(--muted);
  line-height: 1.8;
}

/* Shared surfaces */
.surface-art {
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 228, 186, 0.78), rgba(255, 255, 255, 0.5) 32%),
    radial-gradient(circle at 78% 24%, rgba(188, 231, 255, 0.8), transparent 22%),
    radial-gradient(circle at 68% 72%, rgba(255, 196, 204, 0.74), transparent 26%),
    linear-gradient(180deg, var(--surface), #efefef);
}

.surface-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.26), transparent 34%),
    linear-gradient(180deg, transparent 58%, rgba(255, 255, 255, 0.36));
}

/* Home / list sections */
.hero-image {
  margin-top: var(--section-padding-top);
}

.hero-image-inner {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
}

.hero-image-inner p {
  position: absolute;
  right: 24px;
  bottom: 20px;
  z-index: 1;
  margin: 0;
  color: rgba(17, 17, 17, 0.7);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.page-intro {
  padding: var(--section-padding-top) 4px 24px;
}

.intro-copy {
  grid-column: auto;
  max-width: 32rem;
  margin-top: 18px;
}

.contact-intro {
  padding-bottom: 8px;
}

.contact-intro-copy {
  max-width: 43rem;
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.contact-intro-copy p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.72;
  letter-spacing: -0.02em;
}

.contact-email {
  margin-top: 10px;
}

.contact-email a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}

.contact-email-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  object-fit: contain;
}

.work {
  padding-top: var(--work-padding-top);
}

main > .work:first-child {
  padding-top: var(--section-padding-top);
}

.section-head {
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding: 0 4px 22px;
}

.section-head h1,
.section-head h2 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 0.92;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap-y) var(--grid-gap-x);
}

.project-item {
  display: grid;
  gap: 14px;
  transition:
    transform 0.28s ease,
    opacity 0.28s ease;
}

.project-item:hover {
  transform: translateY(-2px);
}

.project-thumb {
  position: relative;
  aspect-ratio: 4 / 2.7;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.4s ease,
    filter 0.4s ease,
    box-shadow 0.4s ease;
}

.project-item:hover .project-thumb {
  transform: scale(1.01);
  filter: contrast(1.01) saturate(1.01);
  box-shadow: 0 20px 42px rgba(17, 17, 17, 0.09);
}

.project-thumb-image,
.project-thumb-video,
.hero-image-asset,
.detail-thumb-image,
.detail-gallery-video,
.detail-gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image-asset,
.project-thumb-image,
.detail-thumb-image {
  position: absolute;
  inset: 0;
}


.project-thumb-video {
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.project-thumb-contain {
  display: grid;
  place-items: center;
  background: #a1a6ac;
}

.project-thumb-contain .project-thumb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  margin: 0;
  filter: drop-shadow(0 12px 22px rgba(17, 17, 17, 0.18));
}

.project-text {
  display: grid;
  gap: 6px;
}

.project-title {
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.project-meta {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  display: none;
}

/* Project detail */
.detail-visual {
  margin-top: 40px;
}

.detail-thumb {
  position: relative;
  aspect-ratio: 4 / 2.7;
  overflow: hidden;
  border-radius: var(--radius);
}

.detail-thumb-contain {
  display: grid;
  place-items: center;
  background: #a1a6ac;
}

.detail-thumb-contain .detail-thumb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: contain;
  object-position: center center;
}

.detail-copy {
  max-width: 980px;
  padding: 88px 4px 0;
}

.detail-year {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.detail-title {
  font-size: clamp(2.3rem, 4vw, 3.2rem);
  line-height: 1;
}

.detail-summary,
.detail-overview {
  max-width: 920px;
  margin: 18px 0 0;
  font-size: clamp(0.94rem, 1.15vw, 1.02rem);
  line-height: 1.65;
  letter-spacing: -0.015em;
}

.detail-summary {
  color: #1b1b1b;
  font-size: clamp(1rem, 1.28vw, 1.1rem);
}

.detail-overview {
  color: var(--muted);
}

.detail-gallery {
  padding-top: 72px;
}

.detail-gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.detail-gallery-item {
  position: relative;
  min-height: 52vh;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.detail-gallery-item.has-video {
  display: grid;
  place-items: center;
  background: #ffffff;
}

.detail-gallery-item::before {
  content: "TEMP IMAGE";
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 999px;
}

.detail-gallery-item.has-asset::before,
.detail-thumb.has-asset::before {
  content: none;
}

.detail-gallery-item.has-video .detail-gallery-video {
  display: block;
  position: relative;
  width: min(600px, 100%);
  height: auto;
  max-height: 100%;
  border: 1px solid #111111;
  outline: 0;
  object-fit: contain;
}

.detail-back {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 32px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--text);
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.detail-back .back-link[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.detail-back .back-link:not(.back-link-prev):not(.back-link-next) {
  margin: 0 auto;
}

.back-link-prev,
.back-link-next {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  position: relative;
}

.back-link-prev::before,
.back-link-next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  background: var(--text);
  transform: translate(-50%, -50%);
}

.back-link-prev::before {
  margin-left: 1px;
}

.back-link-next::before {
  margin-left: -1px;
}

.back-link-prev::after,
.back-link-next::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--text);
  border-right: 2px solid var(--text);
}

.back-link-prev::after {
  left: 50%;
  transform: translate(-11px, -50%) rotate(-135deg);
}

.back-link-next::after {
  left: 50%;
  transform: translate(-2px, -50%) rotate(45deg);
}

.back-link-list {
  min-width: 120px;
}

.back-link:hover {
  opacity: 0.6;
}

/* Info pages */
.info-list {
  border-top: 1px solid var(--line);
}

.info-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
}

.info-row p,
.info-row a {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.info-list-contact .info-row p,
.info-list-contact .info-row a {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
}

.contact-content {
  padding-top: 72px;
  border-top: 0;
}

.contact-content .info-row:first-child {
  border-top: 1px solid var(--line);
}

/* Color variants */
.thumb-sand {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.34), transparent 28%),
    linear-gradient(135deg, #f4d39d, #f8e6ca 58%, #fcf7ef);
}

.thumb-ocean {
  background:
    radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.36), transparent 24%),
    linear-gradient(135deg, #b6dff4, #d9eff9 58%, #f7fbfd);
}

.thumb-forest {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.3), transparent 24%),
    linear-gradient(135deg, #cfe5d7, #e4f2e8 58%, #f9fcfa);
}

.thumb-rose {
  background:
    radial-gradient(circle at 70% 26%, rgba(255, 255, 255, 0.34), transparent 24%),
    linear-gradient(135deg, #f3c8d2, #f8e2e7 58%, #fdf8f9);
}

.thumb-stone {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.2), transparent 24%),
    linear-gradient(135deg, #8f959c, #a1a6ac 58%, #bcc1c7);
}


.thumb-night {
  background:
    radial-gradient(circle at 68% 24%, rgba(255, 255, 255, 0.24), transparent 20%),
    linear-gradient(135deg, #c9d7ea, #e4edf7 58%, #f8fbff);
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal-delay {
  transition-delay: 0.12s;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  :root {
    --section-padding-top: 64px;
    --work-padding-top: 80px;
    --grid-gap-x: 24px;
    --grid-gap-y: 44px;
  }

  .project-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-image-inner {
    min-height: 58vh;
  }

  .detail-thumb {
    aspect-ratio: 4 / 2.7;
  }

  .detail-thumb-contain .detail-thumb-image {
    max-width: none;
    max-height: none;
  }

  .detail-copy {
    padding-top: 64px;
  }

  .detail-gallery-item {
    min-height: 38vh;
  }
}

@media (max-width: 640px) {
  :root {
    --page-width: min(100% - 24px, 100%);
    --page-padding-bottom: 48px;
    --section-padding-top: 48px;
    --work-padding-top: 64px;
  }

  .topbar {
    align-items: flex-start;
    gap: 14px;
  }

  .brand-logo {
    max-height: 24px;
  }

  .menu {
    gap: 8px 14px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .page-title {
    font-size: clamp(2.8rem, 14vw, 4.8rem);
  }

  .hero-copy,
  .intro-copy {
    max-width: none;
    font-size: 0.95rem;
  }

  .hero-image {
    margin-top: 28px;
  }

  .hero-image-inner {
    min-height: 42vh;
  }

  .hero-image-inner p {
    right: 16px;
    bottom: 16px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-item {
    gap: 12px;
  }

  .project-title {
    font-size: 1.45rem;
  }

  .info-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 4px;
  }

  .info-row p,
  .info-row a {
    font-size: 1.08rem;
  }

  .detail-visual {
    margin-top: 48px;
  }

  .detail-thumb {
    aspect-ratio: 4 / 2.7;
  }

  .detail-thumb-contain .detail-thumb-image {
    max-width: none;
    max-height: none;
  }

  .detail-copy {
    padding-top: 48px;
  }

  .detail-title {
    font-size: 2rem;
  }

  .detail-summary,
  .detail-overview {
    font-size: 0.95rem;
  }

  .detail-gallery {
    padding-top: 40px;
  }

  .detail-gallery-item {
    min-height: 26vh;
  }

  .back-link {
    width: 100%;
  }

  .back-link-prev,
  .back-link-next {
    width: 42px;
    height: 42px;
    align-self: center;
  }

  .detail-back {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }

  .detail-back .back-link:not(.back-link-prev):not(.back-link-next) {
    margin: 0;
  }

  .back-link-list {
    width: auto;
    min-width: auto;
  }

  .detail-back .back-link[hidden] {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
