:root {
  --bg: #f4efe7;
  --bg-soft: rgba(255, 255, 255, 0.7);
  --card: rgba(255, 252, 247, 0.92);
  --card-strong: #fffdf9;
  --text: #1d2b28;
  --muted: #556662;
  --line: rgba(29, 43, 40, 0.12);
  --accent: #0d8a72;
  --accent-strong: #0a6a58;
  --accent-soft: rgba(13, 138, 114, 0.12);
  --shadow: 0 20px 50px rgba(73, 52, 23, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(13, 138, 114, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(194, 113, 65, 0.16), transparent 24%),
    linear-gradient(180deg, #f7f2ea 0%, #f3ede4 100%);
  color: var(--text);
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  min-height: 100vh;
}

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

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

.site-shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.hero,
.cohort-nav-section,
.gallery-section,
.viewer-header,
.viewer-main,
.site-footer {
  backdrop-filter: blur(12px);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  min-height: 360px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
}

.hero::before {
  width: 260px;
  height: 260px;
  background: rgba(13, 138, 114, 0.12);
  top: -70px;
  right: 8%;
}

.hero::after {
  width: 180px;
  height: 180px;
  background: rgba(194, 113, 65, 0.14);
  bottom: -55px;
  left: 10%;
}

.hero__inner {
  padding: 56px;
  position: relative;
  z-index: 1;
}

.hero__media,
.hero__media img {
  inset: 0;
  height: 100%;
  position: absolute;
  width: 100%;
}

.hero__media img {
  object-fit: cover;
}

.hero--image::before {
  background:
    linear-gradient(115deg, rgba(16, 22, 20, 0.74) 12%, rgba(16, 22, 20, 0.38) 48%, rgba(16, 22, 20, 0.16) 100%),
    radial-gradient(circle at top right, rgba(13, 138, 114, 0.36), transparent 26%);
  border-radius: 0;
  filter: none;
  height: auto;
  inset: 0;
  right: auto;
  top: 0;
  width: auto;
}

.hero--image::after {
  width: 320px;
  height: 320px;
  background: rgba(255, 255, 255, 0.12);
  bottom: -120px;
  left: auto;
  right: -40px;
}

.hero--image .hero__inner {
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 42px 44px;
}

.hero__eyebrow,
.section-heading__kicker,
.work-card__tag,
.viewer-header__title p,
.meta-card__label,
.viewer-meta__card span {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__title,
.section-heading h2,
.viewer-header__title h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__title {
  font-size: clamp(42px, 7vw, 76px);
  max-width: 780px;
}

.hero--compact .hero__inner {
  padding: 42px 44px;
}

.hero__layout {
  align-items: end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
}

.hero__content {
  min-width: 0;
}

.hero--compact {
  background:
    radial-gradient(circle at top right, rgba(13, 138, 114, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(194, 113, 65, 0.12), transparent 22%),
    linear-gradient(135deg, rgba(255, 253, 249, 0.96) 0%, rgba(245, 239, 231, 0.88) 100%);
  min-height: auto;
}

.hero--compact::before {
  width: 180px;
  height: 180px;
  top: -30px;
  right: -20px;
}

.hero--compact::after {
  width: 140px;
  height: 140px;
  bottom: -28px;
  left: 12%;
}

.hero--compact .hero__title {
  font-size: clamp(32px, 5vw, 54px);
  max-width: 900px;
}

.hero--compact .hero__copy {
  margin: 16px 0 0;
  max-width: 700px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__meta span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(29, 43, 40, 0.08);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
}

.hero__controls {
  display: grid;
  gap: 14px;
  justify-items: end;
  min-width: min(320px, 100%);
}

.hero__select-wrap {
  display: grid;
  gap: 8px;
  justify-items: end;
  width: min(320px, 100%);
}

.hero__select-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__select {
  appearance: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 242, 235, 0.96) 100%);
  border: 1px solid rgba(29, 43, 40, 0.12);
  border-radius: 18px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  min-height: 52px;
  padding: 0 46px 0 16px;
  width: 100%;
  box-shadow: 0 10px 24px rgba(29, 43, 40, 0.08);
}

.hero__select-wrap {
  position: relative;
}

.hero__select-wrap::after {
  content: "";
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid rgba(29, 43, 40, 0.55);
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 43px;
}

.hero__copy,
.section-heading__text {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  max-width: 720px;
}

.hero--image .hero__eyebrow,
.hero--image .hero__title,
.hero--image .hero__copy {
  color: #fff;
}

.hero--image .hero__eyebrow {
  margin: 0 0 14px;
}

.hero--image .hero__title {
  max-width: 860px;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.hero--image .hero__copy {
  margin: 18px 0 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
}

.page-content {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.gallery-section {
  border-radius: 32px;
  padding: 28px;
}

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading__text {
  margin: 0;
  max-width: 420px;
  text-align: right;
}

.gallery-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-card {
  background: var(--card);
  border: 1px solid rgba(29, 43, 40, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.work-card:hover,
.work-card:focus-within {
  box-shadow: 0 24px 40px rgba(13, 138, 114, 0.18);
  transform: translateY(-4px);
}

.work-card__media {
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #d9ece8 0%, #e9d7cb 100%);
  height: clamp(420px, 43vw, 620px);
  position: relative;
}

.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s ease;
}

.work-card:hover .work-card__media img,
.work-card:focus-within .work-card__media img {
  transform: scale(1.03);
}

.work-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(13, 27, 24, 0.08) 0%, rgba(13, 27, 24, 0.16) 32%, rgba(32, 173, 150, 0.76) 100%);
  color: #fff;
  transition: background 0.3s ease;
}

.work-card:hover .work-card__overlay,
.work-card:focus-within .work-card__overlay {
  background: linear-gradient(180deg, rgba(13, 27, 24, 0.08) 0%, rgba(13, 27, 24, 0.2) 26%, rgba(32, 173, 150, 0.9) 100%);
}

.work-card__title {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.work-card__body {
  padding: 20px 20px 22px;
}

.work-card__body h3 {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.35;
}

.work-card__link,
.viewer-header__back,
.viewer-header__link,
.site-footer a {
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.work-card__link {
  color: var(--accent-strong);
  display: inline-flex;
  margin-top: 18px;
  font-weight: 700;
}

.work-card__overlay .work-card__tag,
.work-card__overlay .work-card__link {
  color: #fff;
}

.work-card__overlay .work-card__link {
  margin-top: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.work-card__link:hover,
.viewer-header__back:hover,
.viewer-header__link:hover,
.site-footer a:hover {
  color: var(--accent);
}

.site-footer {
  border-radius: 24px;
  margin-top: 24px;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.site-footer strong {
  color: var(--text);
  margin-right: 12px;
}

.site-shell--work {
  width: min(1400px, calc(100vw - 24px));
}

.viewer-header {
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  padding: 18px 22px;
}

.viewer-header--classic {
  background: #2d394b;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 60px;
  padding: 10px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.viewer-header--classic .viewer-header__back--icon,
.viewer-header--classic .viewer-header__back--icon:hover {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #9cc9f5;
  display: inline-flex;
  justify-content: center;
  padding: 0;
}

.viewer-header__back--icon svg {
  fill: currentColor;
  height: 26px;
  width: 26px;
}

.viewer-header__back,
.viewer-header__link {
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  padding: 12px 18px;
  white-space: nowrap;
}

.viewer-header--classic .viewer-header__back {
  background: transparent;
  border: 0;
  color: #9cc9f5;
  padding: 0;
}

.viewer-header--classic .viewer-header__back:hover {
  color: #fff;
}

.viewer-header--classic .viewer-header__link {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #dce7f6;
  padding: 10px 16px;
}

.viewer-header--classic .viewer-header__link:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.viewer-header__title--compact h1 {
  font-size: clamp(20px, 3vw, 30px);
}

.viewer-devices {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: rgba(29, 43, 40, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.viewer-device {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: inherit;
  font-weight: 700;
  line-height: 1.1;
  min-width: 96px;
  padding: 11px 18px;
  position: relative;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.viewer-device--active {
  background: linear-gradient(135deg, #0d8a72 0%, #18695e 100%);
  color: #fff;
  box-shadow: 0 14px 24px rgba(13, 138, 114, 0.24);
  transform: translateY(-1px);
}

.viewer-device__label {
  font-size: 14px;
}

.viewer-device__hint {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.66;
  text-transform: uppercase;
}

.viewer-header__title {
  flex: 1;
  min-width: 0;
}

.viewer-header__title h1 {
  font-size: clamp(24px, 4vw, 42px);
}

.viewer-main {
  border-radius: 28px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  padding: 20px;
}

.viewer-main--single {
  display: block;
}

.viewer-stage {
  align-items: center;
  background:
    radial-gradient(circle at top left, rgba(13, 138, 114, 0.16), transparent 24%),
    linear-gradient(180deg, #e7eeeb 0%, #dde5e1 100%);
  border-radius: 24px;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 220px);
  overflow: hidden;
  padding: 28px;
  position: relative;
  transition: background 0.25s ease, padding 0.25s ease;
}

.viewer-main--single,
.viewer-stage {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.viewer-stage {
  display: block;
  min-height: auto;
}

.viewer-stage::before {
  display: none;
}

.viewer-devices--classic {
  background: none;
  border: 0;
  gap: 12px;
  left: 50%;
  padding: 0;
  position: absolute;
  transform: translateX(-50%);
}

.viewer-devices--classic .viewer-device {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #8a94a4;
  min-width: auto;
  padding: 0;
}

.viewer-devices--classic .viewer-device:hover,
.viewer-devices--classic .viewer-device:focus-visible {
  color: #b6c4da;
  transform: none;
}

.viewer-devices--classic .viewer-device--active {
  background: transparent;
  box-shadow: none;
  color: #fff;
}

.viewer-device__icon {
  display: inline-flex;
  height: 32px;
  width: 32px;
}

.viewer-device__icon svg {
  fill: currentColor;
  height: 32px;
  width: 32px;
}

.frame-wrapper {
  width: 100%;
}

.frame {
  border: none;
  display: block;
  min-height: calc(100vh - 60px);
  width: 100%;
}

.frame-wrapper.frame-wrapper_tablet {
  width: 785px;
}

.frame-wrapper.frame-wrapper_smartphone {
  width: 392px;
}

@media (min-width: 780px) {
  .frame-wrapper.frame-wrapper_tablet {
    border: 1px solid #fff;
    box-shadow: 0 14px 24px rgba(45, 57, 75, 0.1);
    margin: 50px auto;
  }

  .frame-wrapper.frame-wrapper_tablet .frame {
    min-height: 1024px;
  }
}

@media (min-width: 440px) {
  .frame-wrapper.frame-wrapper_smartphone {
    border: 1px solid #fff;
    box-shadow: 0 14px 24px rgba(45, 57, 75, 0.1);
    margin: 50px auto;
  }

  .frame-wrapper.frame-wrapper_smartphone .frame {
    min-height: 812px;
  }
}

.viewer-stage::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(29, 43, 40, 0.12);
  border-radius: 18px;
  pointer-events: none;
}

.viewer-frame-wrap {
  background: #fff;
  border: 14px solid #1f2423;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(29, 43, 40, 0.22);
  min-height: calc(100vh - 220px);
  overflow: hidden;
  margin: 0 auto;
  position: relative;
  transition: width 0.25s ease, border-radius 0.25s ease, border-width 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  width: 100%;
}

.viewer-frame-wrap::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 120px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(-50%);
  z-index: 2;
}

.viewer-frame {
  width: 100%;
  min-height: calc(100vh - 220px);
  border: 0;
  background: #fff;
}

.viewer-frame-wrap--desktop {
  width: 100%;
  border-radius: 24px;
  border-width: 12px;
}

.viewer-frame-wrap--tablet {
  max-width: 820px;
  border-radius: 34px;
  border-width: 16px;
}

.viewer-frame-wrap--mobile {
  max-width: 420px;
  border-radius: 42px;
  border-width: 14px;
}

.viewer-stage--desktop .viewer-frame-wrap {
  box-shadow: 0 24px 60px rgba(29, 43, 40, 0.18);
}

.viewer-stage--tablet {
  background:
    radial-gradient(circle at top right, rgba(194, 113, 65, 0.18), transparent 22%),
    linear-gradient(180deg, #e6e2dc 0%, #ddd7cf 100%);
}

.viewer-stage--tablet .viewer-frame-wrap {
  transform: translateY(-4px);
}

.viewer-stage--mobile {
  background:
    radial-gradient(circle at top center, rgba(13, 138, 114, 0.12), transparent 20%),
    linear-gradient(180deg, #e4e7ec 0%, #d4dae2 100%);
}

.viewer-stage--mobile .viewer-frame-wrap {
  box-shadow: 0 28px 72px rgba(29, 43, 40, 0.26);
}

.viewer-frame-wrap[data-device="desktop"]::before {
  width: 140px;
}

.viewer-frame-wrap[data-device="mobile"]::before {
  width: 92px;
}

@media (max-width: 1040px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-shell,
  .site-shell--work {
    width: min(100vw - 16px, 100%);
    padding-top: 8px;
  }

  .hero__inner,
  .gallery-section,
  .viewer-main {
    padding: 20px;
  }

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

  .hero,
  .hero--image .hero__inner {
    min-height: 280px;
  }

  .hero--compact .hero__inner {
    padding: 28px 24px;
  }

  .hero__meta {
    gap: 10px;
    margin-top: 18px;
  }

  .hero__controls,
  .hero__select-wrap {
    justify-items: stretch;
    min-width: 0;
    width: 100%;
  }

  .hero__select-label {
    text-align: left;
  }

  .hero--image .hero__inner {
    padding: 24px;
  }

  .section-heading,
  .site-footer,
  .viewer-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .section-heading__text {
    max-width: none;
    text-align: left;
  }

  .viewer-header__back,
  .viewer-header__link {
    width: 100%;
    text-align: center;
  }

  .viewer-devices {
    width: 100%;
    border-radius: 20px;
    padding: 8px;
  }

  .viewer-header--classic {
    flex-direction: row;
    align-items: center;
    min-height: auto;
    padding: 12px 16px;
  }

  .viewer-header--classic .viewer-header__back,
  .viewer-header--classic .viewer-header__link {
    text-align: left;
    width: auto;
  }

  .viewer-header__title--classic {
    order: 3;
    padding: 0;
    width: 100%;
  }

  .viewer-header__title--classic h1 {
    white-space: normal;
  }

  .viewer-devices--classic {
    gap: 18px;
    left: auto;
    position: static;
    transform: none;
    width: auto;
  }

  .viewer-devices--classic .viewer-device {
    flex: 0 0 auto;
    padding: 0;
  }

  .viewer-device {
    flex: 1;
    text-align: center;
    min-width: 0;
    padding: 12px 10px;
  }

  .viewer-stage {
    padding: 0;
  }

  .frame-wrapper.frame-wrapper_tablet,
  .frame-wrapper.frame-wrapper_smartphone {
    width: 100%;
    margin: 0;
  }

  .work-card__media {
    height: min(76vh, 560px);
  }
}
