@font-face {
  font-family: Manrope;
  src: url('../assets/manrope.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0b0e;
  --panel: #111115;
  --line: #28282e;
  --text: #f5f4f7;
  --muted: #adabb6;
  --accent: #c6afff;
  --max: 1320px;
  --gutter: clamp(22px, 6.1vw, 110px);
  font-family: Manrope, Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 1rem; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: #120a21; }
.shell { width: min(calc(100% - var(--gutter) * 2), var(--max)); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 10; padding: 12px 20px; background: var(--text); color: var(--bg); }

.site-header {
  z-index: 5;
  position: sticky;
  top: 0;
  background: rgb(11 11 14 / 90%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #ffffff13;
}
.header-inner {
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}
.wordmark { display: inline-flex; align-items: center; gap: 11px; width: fit-content; white-space: nowrap; font-size: .98rem; font-weight: 800; letter-spacing: -.025em; }
.wordmark b { font-size: .84em; letter-spacing: .045em; }
.mark { width: 23px; height: 23px; display: grid; place-items: center; position: relative; }
.mark::before, .mark::after { content: ""; position: absolute; transform: rotate(45deg); }
.mark::before { width: 16px; height: 16px; border: 1px solid #dfd3ff; border-radius: 2px; }
.mark::after { width: 5px; height: 5px; background: #dfd3ff; border-radius: 1px; }
.header-inner nav { display: flex; align-items: center; gap: clamp(21px, 3.6vw, 52px); }
.header-inner nav a { font-size: .9rem; color: var(--muted); transition: color .2s ease; }
.header-inner nav a:hover, .header-inner nav .current { color: var(--text); }
.nav-contact { justify-self: end; }
.nav-contact, .button { display: inline-flex; justify-content: center; align-items: center; white-space: nowrap; border-radius: 100px; line-height: 1.2; font-size: .875rem; font-weight: 700; }
.nav-contact { padding: 10px 17px; border: 1px solid #ffffff30; transition: background .2s ease, border-color .2s ease; }
.nav-contact:hover, .button-glass:hover { background: #ffffff17; border-color: #ffffff69; }

.hero { position: relative; isolation: isolate; display: grid; min-height: clamp(555px, 47vw, 760px); overflow: hidden; background: #0b0b10; }
.hero-media, .hero::after { position: absolute; inset: 0; z-index: -1; }
.hero-media { overflow: hidden; }
.hero-media img, .hero-media video { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.hero-media img { animation: hero-arrive 1.9s ease-out both; }
.hero::after {
  content: "";
  background:
    linear-gradient(0deg, var(--bg) 0%, transparent 19%),
    linear-gradient(90deg, #0a0a0f 2%, #0a0a0fdb 26%, #0a0a0f6b 51%, transparent 76%);
}
.hero-inner { display: flex; align-items: center; padding-block: 74px 83px; }
.hero-content { animation: title-arrive .85s ease-out both; }
.eyebrow { color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .155em; line-height: 1.5; }
.hero-label { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.hero-label span { width: 23px; height: 1px; background: var(--accent); }
.hero h1 { font-weight: 800; font-size: clamp(4.45rem, 8vw, 8.1rem); letter-spacing: -.079em; line-height: .87; }
.hero h1 strong { display: inline-block; padding: .07em .12em .11em 0; font-weight: 800; background: linear-gradient(172deg, #fff 22%, #e7e5eb 62%, #9795a2); background-clip: text; color: transparent; }
.hero-roles { color: #e2deea; font-size: clamp(.89rem, 1.25vw, 1.06rem); line-height: 1.65; margin-top: 15px; }
.hero-roles span { margin-inline: .34em; color: #aaa2ba; }
.hero-line { margin-top: 8px; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.button { min-height: 48px; padding: 0 23px; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-light { background: var(--text); color: #101015; }
.button-light:hover { background: #ded2ff; }
.button-glass { border: 1px solid #ffffff37; background: #ffffff06; }
@keyframes hero-arrive { from { transform: scale(1.045); opacity: .28; } to { transform: scale(1); opacity: 1; } }
@keyframes title-arrive { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.section { scroll-margin-top: 82px; padding-block: clamp(68px, 7.6vw, 114px); }
.work { padding-top: clamp(70px, 8vw, 128px); }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 28px; }
.section h2 { margin-top: 10px; font-size: clamp(2.55rem, 5.4vw, 5.2rem); font-weight: 800; line-height: 1.11; letter-spacing: -.065em; overflow-wrap: anywhere; }
.accent { color: var(--accent); margin-left: .07em; }
.section-aside, .contact-intro { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.section-aside { margin-bottom: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 54px); }
.filters button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: #d1ced8;
  border-radius: 100px;
  padding: 10px 16px;
  font-size: .875rem;
  line-height: 1.3;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.filters button:hover { border-color: #8e819e; }
.filters button[aria-pressed="true"] { color: #101014; background: var(--text); border-color: var(--text); font-weight: 800; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(42px, 7vw, 102px) clamp(20px, 3vw, 44px);
}
.project-card {
  grid-column: span 4;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}
.card-media {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  background: #171620;
  box-shadow: 0 15px 36px #0005;
}
.card-media::after {
  position: absolute;
  inset: 0;
  border: 1px solid #ffffff29;
  border-radius: inherit;
  content: '';
  pointer-events: none;
  transition: border-color .3s ease;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s cubic-bezier(.18,.76,.3,1);
}
.card-type {
  position: absolute;
  top: clamp(12px, 1.6vw, 21px);
  left: clamp(12px, 1.6vw, 21px);
  background: #0f0d16e8;
  border: 1px solid #ffffff36;
  border-radius: 100px;
  padding: 5px 12px;
  color: #f4edff;
  font-weight: 750;
  font-size: .875rem;
}
.card-body {
  padding: clamp(16px, 2vw, 25px) 0 14px;
  border-bottom: 1px solid var(--line);
  transition: border-color .3s ease;
}
.card-body h3 {
  margin: 0 0 7px;
  font-size: clamp(1.45rem, 2.55vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -.045em;
  transition: color .3s ease;
}
.card-summary { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.card-note { display: block; margin-top: 9px; color: var(--muted); font-size: .8rem; }
.project-card:focus-visible .card-body { border-color: var(--accent); }

@media (hover: hover) {
  .project-card:hover img { transform: scale(1.045); }
  .project-card:hover .card-media::after,
  .project-card:hover .card-body { border-color: #c8a6ff80; }
  .project-card:hover h3 { color: var(--accent); }
}

.about { border-block: 1px solid #ffffff12; background: #111115; }
.about-grid { display: grid; grid-template-columns: 1.03fr 1fr; gap: clamp(30px, 7vw, 112px); align-items: center; }
.about-visual { aspect-ratio: 1.24; overflow: hidden; border-radius: 15px; background: #171620; border: 1px solid var(--line); }
.about-visual img { width: 100%; height: 100%; object-fit: cover; }
.about-intro { margin-top: 20px; max-width: 33em; color: #cbc9d2; line-height: 1.9; }
.services { padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.services li { border: 1px solid #ffffff26; color: #e7e3ee; font-size: .875rem; padding: 7px 12px; border-radius: 8px; }

.contact { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: clamp(25px, 6.5vw, 100px); }
.contact-intro { margin-top: 17px; }
.contact-list { border-top: 1px solid var(--line); }
.contact-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 4.25rem; gap: clamp(6px, 1vw, 12px); align-items: center; min-height: 58px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.contact-value { text-align: right; color: var(--muted); overflow-wrap: anywhere; }
a.contact-value:hover { color: var(--accent); }
.contact-row button { width: 100%; font-size: .875rem; border: 1px solid var(--line); border-radius: 8px; background: transparent; padding: 5px 8px; cursor: pointer; }
.contact-row button:hover { border-color: var(--accent); }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.footer-inner > a:last-child { color: var(--muted); font-size: .875rem; }
.footer-inner > a:last-child:hover, .back-link:hover { color: var(--text); }

.detail-main { padding-block: 42px 95px; min-height: 79vh; }
.back-link { display: inline-block; color: var(--muted); font-size: .94rem; padding-block: 8px; transition: color .2s ease; }
.project-heading { margin-block: 40px 32px; }
.project-heading h1, .project-missing h1 { margin-top: 14px; font-size: clamp(3.1rem, 8vw, 7.75rem); line-height: 1.1; letter-spacing: -.07em; }
.project-deck { margin-top: 14px; color: #c0bdc9; font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.7; }
.detail-media { background: #171620; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.detail-media img, .detail-media video { width: 100%; max-height: 76vh; object-fit: contain; }
.media-note { margin: 12px 18px; color: var(--muted); }
.project-story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 8vw, 105px); padding-block: 54px; }
.project-story h2 { margin: 8px 0 17px; font-size: clamp(1.7rem, 3.4vw, 2.8rem); letter-spacing: -.035em; line-height: 1.2; }
.project-story ul { margin: 0; padding: 0; list-style: none; }
.project-story li + li { margin-top: 15px; }
.project-story p:not(.eyebrow) { color: #c2bfcb; line-height: 1.85; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; margin-bottom: 35px; }
.gallery img { width: 100%; height: auto; align-self: start; border-radius: 12px; border: 1px solid var(--line); }
.project-next { border-block: 1px solid var(--line); }
.project-next a { display: grid; gap: 7px; padding: 24px 0; }
.project-next strong { font-size: 1.65rem; }
.project-next a:hover strong { color: var(--accent); }
.project-missing { padding-block: 48px 100px; }
.project-missing p { margin-top: 20px; color: var(--muted); line-height: 1.8; }

@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card { grid-column: span 1; }
}

@media (max-width: 660px) {
  .header-inner { min-height: 68px; grid-template-columns: 1fr auto; gap: 0 12px; padding-block: 12px; }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 28px; padding-top: 9px; }
  .header-inner nav a { padding-block: 4px; }
  .nav-contact { grid-column: 2; grid-row: 1; padding: 8px 12px; }
  .section { scroll-margin-top: 106px; }
  .hero { min-height: 620px; }
  .hero-inner { align-items: end; padding-block: 80px 53px; }
  .hero h1 { font-size: clamp(3.35rem, 11.8vw, 5.4rem); }
  .hero-media img, .hero-media video { object-position: 84% 35%; height: 78%; }
  .hero::after { background: linear-gradient(0deg, var(--bg) 2%, #0a0a0fee 29%, #0a0a0f35 67%, transparent 100%); }
  .hero-roles { margin-top: 12px; }
  .hero-label { margin-bottom: 19px; }
  .section-top { align-items: start; flex-direction: column; gap: 10px; margin-bottom: 20px; }
  .filters { margin-bottom: 28px; }
  .filters button { padding: 9px 12px; }
  .project-grid, .about-grid, .contact, .project-story { grid-template-columns: minmax(0, 1fr); }
  .about-visual { aspect-ratio: 1.6; }
  .detail-main { padding-block: 24px 60px; }
  .project-heading { margin-block: 24px; }
  .project-story { padding-block: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .project-card:hover img { transform: none; }
}

#work .section-top { gap: clamp(18px, 5vw, 76px); }
#work .section-aside { max-width: 30em; font-size: .9375rem; line-height: 1.85; }
.card-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #101014; opacity: 0; pointer-events: none; }
.card-preview.is-playing { opacity: 1; }
.card-type { z-index: 1; }

#contact-title { font-size: clamp(2rem, 5.2vw, 4.5rem); font-weight: 550; line-height: 1.04; max-width: 11ch; }

.project-card { grid-template-rows: 1fr auto; border-bottom: 1px solid var(--line); }
.project-link { display: grid; grid-template-rows: auto 1fr; min-width: 0; text-decoration: none; }
.project-card .card-body { border-bottom: 0; padding-bottom: 0; }
.card-summary:not(.is-expanded) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-actions { min-height: 2.15rem; display: flex; align-items: center; }
.summary-toggle { padding: 3px 0; border: 0; color: var(--accent); background: transparent; font: inherit; font-size: .875rem; cursor: pointer; }
.summary-toggle:hover { text-decoration: underline; }

@media (min-width: 901px) {
  .project-grid.is-complete > .project-card:is(:nth-child(-n+2), :nth-last-child(-n+2)) {
    grid-column: span 6;
  }
}

.card-media img.full-cover { object-fit: contain; transform: none; }

.card-media[data-cover-focus="top"] img { object-position: center top; transform: none; }
.card-media[data-cover-focus="bottom"] img { object-position: center bottom; transform: none; }
.card-media[data-cover-focus="top"] .card-type { top: auto; bottom: clamp(12px, 1.6vw, 21px); }

.template-hero { height: 100svh; min-height: 360px; background: #000; }
.template-hero iframe { display: block; width: 100%; height: 100%; border: 0; }

.template-hero + .work { padding-top: clamp(48px, 6vw, 96px); }


#work .section-top {
  display: grid;
  gap: clamp(10px, 1.5vw, 20px);
  margin-bottom: clamp(32px, 4.5vw, 62px);
}
#work-title {
  display: flex;
  flex-wrap: wrap;
  column-gap: .27em;
  row-gap: .16em;
  font-size: clamp(1.3rem, 3.1vw, 3.25rem);
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -.035em;
}
#work-title > span { white-space: nowrap; }
#work-title .role-divider { color: var(--muted); }
#work .section-aside { max-width: 65ch; font-size: clamp(1rem, 1.55vw, 1.25rem); line-height: 1.65; }
#work .work-label { margin-bottom: 14px; }
