:root {
  --bg: #f5f8fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --surface-soft: rgba(249, 252, 255, 0.7);
  --surface-line: rgba(110, 132, 160, 0.14);
  --surface-line-strong: rgba(108, 132, 160, 0.2);
  --text: #243245;
  --text-soft: #5f6f82;
  --text-faint: #7d8997;
  --shadow-soft: 0 20px 58px rgba(96, 118, 144, 0.1);
  --shadow-card: 0 14px 36px rgba(96, 119, 145, 0.09);
  --radius-xl: 2rem;
  --radius-lg: 1.45rem;
  --radius-md: 1rem;
  --accent-a: rgba(135, 187, 255, 0.22);
  --accent-b: rgba(246, 191, 214, 0.2);
  --accent-c: rgba(159, 224, 207, 0.18);
  --detail-accent: rgba(127, 175, 255, 0.18);
  --detail-line: rgba(98, 121, 148, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.96), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(245, 216, 232, 0.34), transparent 22%),
    radial-gradient(circle at 18% 24%, rgba(201, 234, 255, 0.3), transparent 21%),
    linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)),
    radial-gradient(circle at 18% 20%, rgba(145, 172, 205, 0.18) 0, transparent 46%),
    radial-gradient(circle at 82% 14%, rgba(235, 176, 201, 0.14) 0, transparent 34%);
  mix-blend-mode: screen;
}

img,
video {
  display: block;
  width: 100%;
}

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

button {
  font: inherit;
}

.page-glow {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(72px);
  opacity: 0.6;
  z-index: -1;
}

.page-glow-a {
  width: 22rem;
  height: 22rem;
  top: 1rem;
  left: -7rem;
  background: rgba(183, 223, 255, 0.42);
}

.page-glow-b {
  width: 18rem;
  height: 18rem;
  top: 10rem;
  right: -4rem;
  background: rgba(247, 198, 221, 0.34);
}

.page-glow-c {
  width: 24rem;
  height: 24rem;
  bottom: 5rem;
  right: 12%;
  background: rgba(163, 228, 216, 0.2);
}

.portfolio-main {
  width: min(1160px, calc(100vw - 1.5rem));
  margin: 0 auto;
  padding: 0.25rem 0 2.4rem;
  display: grid;
  gap: 1.15rem;
}

.eyebrow,
.panel-kicker,
.text-label,
.detail-id,
.meta-label,
.video-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
}

.grid-section {
  position: relative;
  padding-top: 0.15rem;
}

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

.section-heading h2,
.detail-heading h3,
.series-copy h3 {
  margin: 0;
  font-family: "Syne", "Trebuchet MS", sans-serif;
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  margin-top: 0.55rem;
  font-size: clamp(1.8rem, 2.7vw, 2.6rem);
}

.section-note,
.panel-copy,
.detail-text p,
.series-lead {
  color: var(--text-soft);
  line-height: 1.74;
}

.section-note {
  max-width: 30rem;
  margin: 0;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
}

.work-card {
  position: relative;
  display: grid;
  gap: 0.62rem;
  padding: 0.72rem;
  border: 1px solid rgba(114, 138, 168, 0.13);
  border-radius: 1.22rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 251, 254, 0.74)),
    radial-gradient(circle at top right, rgba(188, 224, 255, 0.13), transparent 28%);
  box-shadow: var(--shadow-card);
  text-align: left;
  cursor: pointer;
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    box-shadow 240ms ease,
    background-color 220ms ease;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--detail-accent) 82%, white));
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(110, 144, 182, 0.24);
  box-shadow: 0 24px 48px rgba(96, 121, 146, 0.14);
}

.work-card:hover::before,
.work-card:focus-visible::before,
.work-card.is-selected::before {
  opacity: 1;
}

.work-card.is-selected {
  transform: translateY(-3px);
  border-color: rgba(89, 124, 169, 0.24);
  box-shadow: 0 24px 48px rgba(95, 121, 145, 0.16);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.92);
}

.card-image-wrap img {
  height: 100%;
  object-fit: cover;
}

.card-copy {
  display: grid;
  gap: 0.2rem;
}

.card-title {
  font-family: "Syne", "Trebuchet MS", sans-serif;
  font-size: 0.96rem;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.card-meta {
  color: var(--text-faint);
  font-size: 0.8rem;
}

.detail-section {
  padding-bottom: 0.2rem;
  scroll-margin-top: 1.4rem;
}

.detail-shell,
.series-section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, var(--surface-strong), rgba(250, 252, 255, 0.78));
  box-shadow: var(--shadow-soft);
}

.detail-shell {
  padding: 1.55rem;
  transition:
    border-color 220ms ease,
    box-shadow 240ms ease;
  background:
    radial-gradient(circle at 90% 8%, rgba(183, 223, 255, 0.18), transparent 18%),
    radial-gradient(circle at 10% 90%, rgba(255, 214, 229, 0.15), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 253, 255, 0.8));
}

.detail-shell::before,
.series-section::before {
  content: "";
  position: absolute;
  inset: -24% auto auto -10%;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(194, 223, 255, 0.44), transparent 70%);
  pointer-events: none;
}

.detail-shell.is-refreshing {
  animation: detailPulse 300ms ease;
}

@keyframes detailPulse {
  0% {
    transform: translateY(8px);
    opacity: 0.84;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.detail-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.detail-count {
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--detail-line);
  background: rgba(252, 253, 255, 0.82);
  color: var(--text-soft);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(21rem, 0.92fr);
  gap: 1.35rem;
}

.detail-visual,
.detail-copy {
  display: grid;
  gap: 1rem;
}

.main-figure,
.support-figure,
.video-wrap {
  margin: 0;
  border: 1px solid var(--detail-line);
  border-radius: 1.45rem;
  background: rgba(255, 255, 255, 0.84);
  overflow: hidden;
}

.main-figure {
  padding: 1rem;
}

.main-figure img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.98rem;
}

.media-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.support-figure,
.video-wrap {
  padding: 0.85rem;
}

.support-figure figcaption,
.video-label {
  padding: 0 0 0.65rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}

.support-figure img,
.video-wrap video {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.95rem;
}

.detail-copy {
  padding: 0.95rem 0.35rem 0.2rem;
}

.detail-heading h3 {
  margin-top: 0.3rem;
  font-size: clamp(1.95rem, 3vw, 3rem);
}

.detail-meta {
  margin: 0.6rem 0 0;
  color: var(--text-soft);
  font-size: 1rem;
}

.detail-text {
  display: grid;
  gap: 1.35rem;
}

.detail-text p {
  margin: 0.35rem 0 0;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 0.3rem;
}

.nav-button {
  padding: 0.92rem 1.18rem;
  border: 1px solid var(--detail-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 220ms ease,
    background-color 200ms ease,
    border-color 200ms ease;
}

.nav-button:hover,
.nav-button:focus-visible {
  transform: translateY(-2px);
  background: rgba(248, 251, 255, 0.98);
  border-color: rgba(101, 131, 164, 0.24);
}

.series-section {
  display: grid;
  grid-template-columns: 1.3fr 0.92fr;
  gap: 1.4rem;
  padding: 1.7rem;
  background:
    radial-gradient(circle at 84% 10%, rgba(188, 228, 255, 0.2), transparent 16%),
    radial-gradient(circle at 12% 84%, rgba(255, 216, 227, 0.14), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(249, 252, 255, 0.78));
}

.series-copy,
.series-panel {
  position: relative;
  z-index: 1;
}

.series-copy {
  padding: 0.4rem 0.2rem 0.2rem;
}

.series-copy h3 {
  margin-top: 0.55rem;
  font-size: clamp(2rem, 3.2vw, 3.15rem);
  max-width: 12ch;
}

.series-lead {
  max-width: 60ch;
  margin: 1rem 0 0;
  font-size: 1rem;
}

.series-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.7rem;
}

.meta-chip {
  min-width: 12rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(120, 144, 171, 0.14);
  border-radius: 1.1rem;
  background: rgba(245, 249, 253, 0.72);
}

.meta-value {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.98rem;
  color: var(--text);
}

.series-panel {
  border: 1px solid rgba(117, 140, 167, 0.14);
  border-radius: 1.7rem;
  padding: 1.8rem 1.7rem;
  isolation: isolate;
  background:
    radial-gradient(circle at 88% 12%, rgba(165, 221, 218, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(249, 252, 255, 0.74));
}

.panel-orbit {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.panel-orbit-a {
  inset: 1.15rem 1rem auto auto;
  width: 8.75rem;
  height: 8.75rem;
  border: 1.1px solid rgba(119, 166, 231, 0.26);
  transform: rotate(18deg);
}

.panel-orbit-b {
  inset: 2rem 2rem auto auto;
  width: 11.5rem;
  height: 11.5rem;
  border: 1px solid rgba(231, 152, 190, 0.2);
  transform: rotate(-15deg);
}

.panel-copy {
  margin: 0.85rem 0 1rem;
  max-width: 31ch;
}

.panel-details {
  position: relative;
  z-index: 1;
  margin-top: 1.2rem;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid rgba(117, 140, 167, 0.14);
  border-radius: 1.2rem;
  background: rgba(250, 252, 255, 0.72);
}

.panel-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.panel-details p {
  margin: 1rem 0 0;
  color: var(--text-soft);
  line-height: 1.7;
  white-space: pre-line;
}

@media (max-width: 1180px) {
  .works-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .detail-layout,
  .series-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .portfolio-main {
    width: min(100vw - 1rem, 1160px);
  }

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

  .works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .series-copy h3 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .portfolio-main {
    gap: 0.95rem;
    padding-bottom: 1.6rem;
  }

  .detail-shell,
  .series-section {
    padding: 1.2rem;
    border-radius: 1.5rem;
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .work-card {
    padding: 0.66rem;
    border-radius: 1.05rem;
  }

  .detail-heading h3,
  .series-copy h3 {
    font-size: clamp(1.8rem, 8vw, 2.75rem);
  }

  .detail-actions {
    flex-direction: column;
  }

  .nav-button,
  .meta-chip {
    width: 100%;
  }

  .series-meta {
    gap: 0.75rem;
  }
}
