*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #000;
  --white: #fff;
  --gray: #888;
  --line: #d0d0d0;
  --placeholder: #e8e8e8;
  --gap: 8px;
  --side: clamp(60px, 10vw, 160px); /* 統一左右留白 */
  --nav-h: 64px;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-ui: 'Inter', 'Helvetica Neue', Helvetica, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-ui);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  cursor: none;
  overflow-x: hidden;
}

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

/* ─── CURSOR ──────────────────────────── */
.cursor {
  position: fixed;
  width: 7px;
  height: 7px;
  background: var(--black);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease,
              background 0.2s ease, border 0.2s ease;
}

.cursor.on-img {
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.cursor.on-link {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--black);
}

/* ─── NAV ─────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  padding: 0 var(--side);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.4s ease;
}

.nav-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}

.nav-name-en {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
}

.nav-name-zh {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--gray);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.2em;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--black);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { font-weight: 400; }

/* ─── COMMERCIAL GRID ─────────────────── */
#commercial {
  padding-top: var(--nav-h);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding: var(--gap) var(--side);
}

/* ─── PROJECT CARD ────────────────────── */
.project {
  display: block;
  overflow: hidden;
}

.project-img {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--placeholder);
  overflow: hidden;
}

.project-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project:hover .project-img img {
  transform: scale(1.04);
}

.project-info {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 16px 20px;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.project:hover .project-info {
  opacity: 1;
  background: rgba(0, 0, 0, 0.38);
}

.project-info span {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: #fff;
}

/* Play icon — only shows when video URL exists */
.project-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project:hover .project-play {
  opacity: 1;
}

.project-play svg {
  width: 44px;
  height: 44px;
  stroke: #fff;
  fill: none;
  stroke-width: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

/* ─── SECTION RULE ────────────────────── */
.section-rule {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 72px var(--side) 0;
  margin-bottom: var(--gap);
}

.section-rule::before {
  content: '';
  flex: 0 0 24px;
  height: 1px;
  background: var(--black);
}

.section-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-rule span {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--gray);
  white-space: nowrap;
}

/* ─── ABOUT ───────────────────────────── */
.about-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 48px var(--side) 80px;
  max-width: 1000px;
}

.about-photo img,
.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: var(--placeholder);
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 24px;
}

.about-bio {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.7;
  color: #333;
}

.about-credit {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--gray);
  line-height: 2;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

/* ─── CONTACT ─────────────────────────── */
.contact-wrap {
  padding: 48px var(--side) 80px;
  display: flex;
  flex-direction: column;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.2s;
}

.contact-wrap:hover .contact-link:not(:hover) {
  opacity: 0.3;
}

.contact-type {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--gray);
  min-width: 100px;
}

.contact-val {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}

.contact-link:hover .contact-val {
  color: var(--gray);
}

/* ─── FOOTER ──────────────────────────── */
footer {
  padding: 20px var(--side);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--gray);
  border-top: 1px solid var(--line);
}

/* ─── VIDEO MODAL ─────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-inner {
  width: min(90vw, 1200px);
  aspect-ratio: 16 / 9;
}

.modal-inner.portrait {
  width: auto;
  height: min(88vh, 900px);
  aspect-ratio: 9 / 16;
}

.modal-inner iframe {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  font-weight: 300;
  cursor: none;
  letter-spacing: 0.05em;
  transition: color 0.2s;
  line-height: 1;
  padding: 8px;
}

.modal-close:hover {
  color: #fff;
}

/* ─── MOBILE ──────────────────────────── */
@media (max-width: 768px) {
  :root { --gap: 4px; }
  body { cursor: auto; }
  .cursor { display: none; }
  a { cursor: auto; }
  .modal-close { cursor: pointer; }

  :root { --side: 20px; }

  nav { padding: 0 var(--side); }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 10px; letter-spacing: 0.15em; }

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

  .section-rule { padding: 48px var(--side) 0; }

  .about-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px var(--side) 60px;
  }

  .contact-wrap { padding: 32px var(--side) 60px; }
  .contact-link { gap: 16px; }
  .contact-type { min-width: 64px; }

  footer { padding: 16px var(--side); }

  .modal-inner { width: 95vw; }
}
