:root {
  --ink: #111111;
  --muted: #9a938b;
  --line: rgba(255, 255, 255, 0.12);
  --paper: #f8f7f5;
  --white: #ffffff;
  --accent: #c9151e;
  --accent-soft: rgba(201, 21, 30, 0.18);
  --warm: #a66b45;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #050505;
  color: #f4f1ec;
  font-family:
    "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
}

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

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  padding: 10px 14px 10px 18px;
  margin: 0 auto;
  background: rgba(14, 14, 14, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.brand-mark {
  width: clamp(84px, 12vw, 126px);
  height: 36px;
  overflow: hidden;
  border-radius: 999px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.site-nav {
  display: flex;
  gap: 6px;
  color: rgba(244, 241, 236, 0.68);
  font-size: 14px;
}

.site-nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 180ms ease, color 180ms ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  margin-top: -80px;
  padding-top: 80px;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.2), #050505 94%),
    #0a0a0a;
}

.hero::after {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  content: "";
  z-index: -1;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(108px, 14vh, 168px) 0 74px;
  color: var(--white);
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--accent);
  opacity: 1;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 980px;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 22px;
  font-size: clamp(46px, 8vw, 106px);
  font-weight: 650;
  line-height: 0.94;
  text-wrap: balance;
}

.hero-copy {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 34px;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.8;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  font-size: 14px;
}

.primary-link {
  border-color: rgba(201, 21, 30, 0.78);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 34px rgba(201, 21, 30, 0.24);
}

.secondary-link {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
}

.hero-stage {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 0.72fr);
  gap: 12px;
  max-width: 1080px;
  margin: clamp(42px, 7vw, 78px) auto 0;
  text-align: left;
  perspective: 1000px;
}

.stage-card {
  min-height: 154px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(16, 16, 16, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 26px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  transform: translateY(0) rotateX(0);
  transition: transform 260ms ease, border-color 260ms ease;
}

.stage-card:hover {
  border-color: rgba(201, 21, 30, 0.5);
  transform: translateY(-8px) rotateX(4deg);
}

.stage-card-main {
  min-height: 206px;
  background:
    linear-gradient(135deg, rgba(201, 21, 30, 0.2), rgba(255, 255, 255, 0.04)),
    rgba(16, 16, 16, 0.86);
}

.stage-card span {
  display: block;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.stage-card strong {
  display: block;
  max-width: 360px;
  color: #ffffff;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 520;
  line-height: 1.22;
}

.intro-band {
  background: #050505;
  color: var(--white);
}

.intro-grid {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
}

.intro-grid div {
  padding: clamp(24px, 5vw, 46px) clamp(18px, 4vw, 34px);
  background: #080808;
}

.intro-grid span {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 1;
}

.intro-grid p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(84px, 11vw, 140px) 0;
}

.work-section {
  position: relative;
}

.work-section::before {
  position: absolute;
  top: clamp(72px, 10vw, 124px);
  right: 0;
  color: rgba(255, 255, 255, 0.04);
  content: "WORKS";
  font-size: clamp(84px, 18vw, 240px);
  font-weight: 600;
  line-height: 0.8;
  pointer-events: none;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 7vw, 86px);
  align-items: center;
  max-width: 780px;
  margin: 0 auto 54px;
  text-align: center;
}

.section-heading .eyebrow {
  margin-bottom: -18px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 650;
  line-height: 0.98;
  text-wrap: balance;
}

.section-heading p:not(.eyebrow),
.about-copy p,
.contact-card p {
  color: rgba(244, 241, 236, 0.62);
  font-size: 16px;
  line-height: 1.9;
}

.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.showcase-panel {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 20px;
  min-height: 560px;
  padding: clamp(16px, 2vw, 22px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(14, 14, 14, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 28px 90px rgba(0, 0, 0, 0.28);
  isolation: isolate;
  perspective: 1100px;
}

.showcase-panel:first-child {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  grid-template-rows: 1fr;
  min-height: 660px;
}

.showcase-panel:nth-child(4) {
  grid-column: 1 / -1;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
  grid-template-rows: 1fr;
  min-height: 620px;
}

.showcase-panel::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent, rgba(201, 21, 30, 0.18), transparent);
  content: "";
  opacity: 0;
  transform: translateX(-45%);
  transition: opacity 260ms ease;
}

.showcase-panel:hover::before {
  opacity: 1;
}

.showcase-visual {
  position: relative;
  min-height: 0;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 220ms ease;
}

.showcase-main {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: #111111;
  cursor: pointer;
}

.showcase-main::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.48)),
    radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(255, 255, 255, 0.18), transparent 30%);
  content: "";
  opacity: 0.72;
  transition: opacity 260ms ease;
}

.showcase-main:hover::after {
  opacity: 0.92;
}

.showcase-main img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.08) brightness(0.88);
  transition: transform 700ms ease, filter 700ms ease;
}

.showcase-main:hover img {
  filter: saturate(1) contrast(1.12) brightness(0.96);
  transform: scale(1.045);
}

.showcase-strip {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.model-chip {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 138px;
  padding: 7px 10px 7px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.62);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.model-chip:hover,
.model-chip.active {
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
}

.model-chip img {
  border-radius: 12px;
  width: 64px;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(0.18);
}

.model-chip span {
  font-size: 13px;
  white-space: nowrap;
}

.showcase-content {
  position: relative;
  align-self: end;
  max-width: 520px;
  padding: clamp(10px, 2vw, 22px);
}

.showcase-panel:first-child .showcase-content,
.showcase-panel:nth-child(4) .showcase-content {
  align-self: center;
}

.showcase-panel:nth-child(4) .showcase-visual {
  order: 2;
}

.showcase-index {
  position: absolute;
  top: -52px;
  left: 0;
  color: rgba(255, 255, 255, 0.06);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(88px, 14vw, 172px);
  font-style: italic;
  line-height: 1;
}

.showcase-content h3 {
  position: relative;
  margin-bottom: 18px;
  font-size: clamp(36px, 5.4vw, 76px);
  font-weight: 650;
  line-height: 0.98;
}

.showcase-copy {
  position: relative;
  color: rgba(244, 241, 236, 0.64);
  font-size: 16px;
  line-height: 1.9;
}

.showcase-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.showcase-meta span {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 236, 0.72);
  font-size: 13px;
}

.about-section {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.about-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr);
  gap: clamp(34px, 8vw, 110px);
}

.about-copy p {
  margin-bottom: 22px;
}

.contact-section {
  padding: clamp(64px, 9vw, 108px) 0;
  background: #090909;
}

.contact-layout {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  align-items: end;
}

.contact-card {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  font-style: normal;
}

.contact-card span {
  font-size: 24px;
}

.contact-card a {
  width: fit-content;
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.15;
}

.contact-card a:hover {
  color: var(--accent);
}

.contact-card p {
  margin: 0;
}

.qr-code {
  width: 140px;
  border: 1px solid var(--line);
  margin-top: 12px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 clamp(20px, 5vw, 64px);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.work-dialog {
  width: min(1120px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 0;
  background: #080808;
  color: #f4f1ec;
}

.work-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 8, 0.9);
  color: #ffffff;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: min(760px, calc(100svh - 32px));
}

.dialog-media {
  display: grid;
  place-items: center;
  background: #1a1715;
}

.dialog-media img {
  width: 100%;
  max-height: calc(100svh - 32px);
  object-fit: contain;
}

.dialog-info {
  padding: 54px 28px 28px;
  overflow: auto;
}

.dialog-info h3 {
  margin-bottom: 10px;
  font-size: 32px;
  font-weight: 500;
}

.dialog-info p {
  color: rgba(244, 241, 236, 0.62);
  line-height: 1.8;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.thumb-button {
  padding: 0;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
}

.thumb-button.active {
  border-color: var(--accent);
}

.thumb-button img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.floating-contact {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 56px;
  padding: 0 14px;
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  font-size: 14px;
}

@media (max-width: 820px) {
  .site-header {
    min-height: 64px;
  }

  .site-nav {
    gap: 16px;
    font-size: 13px;
  }

  .hero {
    min-height: calc(100svh - 96px);
  }

  .hero-inner {
    width: calc(100% - 32px);
    padding: 118px 0 58px;
  }

  h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .hero-stage {
    grid-template-columns: 1fr;
  }

  .stage-card,
  .stage-card-main {
    min-height: 136px;
  }

  .intro-grid,
  .section-heading,
  .about-layout,
  .contact-layout,
  .dialog-body {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    width: 100%;
  }

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

  .showcase-panel,
  .showcase-panel:first-child,
  .showcase-panel:nth-child(4) {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px;
  }

  .showcase-panel:nth-child(4) .showcase-visual {
    order: 0;
  }

  .showcase-main img {
    aspect-ratio: 4 / 5;
  }

  .showcase-strip {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    overflow-x: auto;
    padding-top: 12px;
  }

  .model-chip {
    flex: 0 0 auto;
  }

  .showcase-index {
    top: -52px;
    font-size: 76px;
  }

  .section,
  .contact-layout {
    width: calc(100% - 32px);
  }

  .section-heading .eyebrow {
    margin-bottom: -8px;
  }

  .dialog-body {
    min-height: auto;
  }

  .dialog-media img {
    max-height: 62svh;
  }

  .dialog-info {
    padding: 28px 18px 20px;
  }

  .thumb-row {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 86px;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav a {
    padding: 9px 10px;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .model-chip {
    grid-template-columns: 52px 1fr;
    min-width: 120px;
  }

  .model-chip img {
    width: 52px;
  }

  .contact-card a {
    font-size: 26px;
    overflow-wrap: anywhere;
  }

  .site-footer {
    padding-bottom: 72px;
  }
}
