/* ============================================================
   Apple-inspired furniture design portfolio
   Light theme, generous whitespace, large type, full-bleed media
   ============================================================ */

:root {
  --bg:            #ffffff;
  --bg-alt:        #f5f5f7;
  --bg-deep:       #0b0b0d;
  --ink:           #1d1d1f;
  --ink-soft:      #6e6e73;
  --ink-faint:     #86868b;
  --hair:          #d2d2d7;
  --accent:        #0071e3;
  --accent-dark:   #0077ed;
  --maxw:          1120px;
  --gutter:        clamp(20px, 5vw, 48px);
  --nav-h:         48px;
  --ease:          cubic-bezier(.28,.11,.32,1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------------- Global nav ---------------- */
.global-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(251, 251, 253, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}

.global-nav.scrolled {
  background: rgba(251, 251, 253, .88);
  border-bottom-color: rgba(0, 0, 0, .1);
}

.nav-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex-shrink: 0;
}

.mark-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink);
  display: block;
}

.mark-thin { font-weight: 300; color: var(--ink-soft); margin-left: 3px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
}

.nav-links a {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: .01em;
  transition: color .25s var(--ease);
}

.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); font-weight: 500; }

.nav-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.nav-cta {
  font-size: 12.5px;
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 980px;
  background: rgba(0, 113, 227, .08);
  transition: background .25s var(--ease);
}
.nav-cta:hover { background: rgba(0, 113, 227, .16); }

.nav-toggle {
  display: none;
  width: 30px; height: 30px;
  border: 0; background: none;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 5px; right: 5px;
  height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 11px; }
.nav-toggle span:nth-child(2) { top: 17px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  padding-top: calc(var(--nav-h) + clamp(56px, 11vw, 128px));
  padding-bottom: clamp(48px, 8vw, 96px);
  text-align: center;
}

.hero-copy { max-width: 900px; margin: 0 auto; padding: 0 var(--gutter); }

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}

/* Hero headline: three short lines, so scale with a smaller preferred size
   than the raw vw ramp and let line-height carry the rhythm. */
.hero-title {
  font-size: clamp(32px, 5.6vw, 60px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-wrap: balance;
  background: linear-gradient(180deg, #1d1d1f 25%, #6e6e73 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* CJK text needs a touch less negative tracking to stay readable at size. */
:lang(zh) .hero-title { letter-spacing: -0.028em; }

.hero-sub {
  margin-top: 24px;
  font-size: clamp(16px, 1.9vw, 21px);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 26px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: all .28s var(--ease);
}

.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #333336; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: rgba(0, 113, 227, .08); }

.hero-media {
  margin: clamp(40px, 6vw, 72px) auto 0;
  max-width: 1440px;
  padding: 0 var(--gutter);
}
.hero-media img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 24px 70px -28px rgba(0, 0, 0, .45);
}

.scroll-hint {
  margin: clamp(28px, 4vw, 44px) auto 0;
  width: 22px; height: 34px;
  border: 1.5px solid var(--hair);
  border-radius: 12px;
  position: relative;
}
.scroll-hint span {
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 6px;
  margin-left: -1.5px;
  background: var(--ink-faint);
  border-radius: 2px;
  animation: scrollDot 1.9s var(--ease) infinite;
}
@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  55%      { transform: translateY(12px); opacity: .25; }
}

/* ---------------- Statement ---------------- */
.statement {
  background: var(--bg-deep);
  color: #f5f5f7;
  padding: clamp(72px, 13vw, 150px) var(--gutter);
  text-align: center;
}

.statement-text {
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(26px, 4.4vw, 50px);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.hl {
  background: linear-gradient(180deg, #1d1d1f 20%, #6e6e73 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.statement .hl {
  background: linear-gradient(180deg, #ffffff 30%, #86868b 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- Section shell ---------------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 10vw, 128px) var(--gutter);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 22px;
  margin-bottom: clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--hair);
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.section-note {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: .06em;
}

/* ---------------- Project ---------------- */
.project { margin-bottom: clamp(72px, 11vw, 140px); }
.project:last-child { margin-bottom: 0; }

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.project-index {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 10px;
}

.project-title {
  font-size: clamp(25px, 3.4vw, 38px);
  letter-spacing: -0.035em;
}

.project-sub {
  margin-top: 7px;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-faint);
}

.project-year {
  font-size: 13px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  padding-top: 6px;
}

.project-hero {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-alt);
  margin-bottom: 30px;
}
.project-hero img { width: 100%; height: auto; }

.project-body {
  display: grid;
  grid-template-columns: 1.55fr .95fr;
  gap: clamp(28px, 5vw, 64px);
  margin-bottom: 30px;
}

.project-desc p {
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--ink-soft);
  font-weight: 300;
}
.project-desc p + p { margin-top: 16px; }

.spec-list { border-top: 1px solid var(--hair); }
.spec-list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 0;
  border-bottom: 1px solid var(--hair);
}
.spec-list span {
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.spec-list strong {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.g-item { margin: 0; }
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: var(--bg-alt);
}
.g-item.g-wide  { grid-column: span 1; }
.g-item.g-full  { grid-column: 1 / -1; }

.g-item figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: .02em;
}

/* ---------------- Craft ---------------- */
.craft { max-width: var(--maxw); }

.craft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: 14px;
  overflow: hidden;
}

.craft-item {
  background: var(--bg);
  padding: clamp(26px, 3.4vw, 40px);
}

.craft-num {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.craft-item h3 {
  font-size: 18px;
  margin-bottom: 9px;
  letter-spacing: -0.02em;
}

.craft-item p {
  font-size: 14.5px;
  line-height: 1.68;
  font-weight: 300;
  color: var(--ink-soft);
}

/* ---------------- Process ---------------- */
.process { max-width: var(--maxw); }

.process-list { border-top: 1px solid var(--hair); }

.process-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: clamp(24px, 3.4vw, 38px) 0;
  border-bottom: 1px solid var(--hair);
  transition: padding-left .35s var(--ease);
}
.process-list li:hover { padding-left: 10px; }

.step-no {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}

.process-list h3 {
  font-size: clamp(19px, 2.3vw, 24px);
  margin-bottom: 8px;
}

.process-list p {
  font-size: 15.5px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 620px;
}

/* ---------------- About ---------------- */
.about {
  max-width: none;
  background: var(--bg-alt);
  padding-top: clamp(72px, 11vw, 132px);
  padding-bottom: clamp(72px, 11vw, 132px);
}
.about > .about-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.about-lead .section-title { margin-bottom: 24px; }

.about-text {
  font-size: 16.5px;
  line-height: 1.74;
  font-weight: 300;
  color: var(--ink-soft);
}
.about-text + .about-text { margin-top: 16px; }

.about-facts { margin-top: 30px; border-top: 1px solid var(--hair); }
.about-facts li {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 14.5px;
}
.about-facts span {
  width: 74px;
  flex-shrink: 0;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 3px;
}
.about-facts strong { font-weight: 500; }

.about-art {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 60px -30px rgba(0, 0, 0, .4);
}
.about-art img { width: 100%; height: auto; }

/* ---------------- Contact ---------------- */
.contact {
  background: var(--bg-deep);
  color: #f5f5f7;
  text-align: center;
}

.contact-inner {
  padding: clamp(80px, 13vw, 150px) var(--gutter) clamp(56px, 8vw, 90px);
}

.contact-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #86868b;
  margin-bottom: 16px;
}

.contact-title {
  font-size: clamp(32px, 5.4vw, 60px);
  letter-spacing: -0.04em;
  margin-bottom: 26px;
}

.contact-mail {
  display: inline-block;
  font-size: clamp(17px, 2.4vw, 26px);
  color: #2997ff;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: border-color .3s var(--ease);
}
.contact-mail:hover { border-bottom-color: #2997ff; }

.contact-links {
  margin-top: 52px;
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: #86868b;
}
.contact-links a { transition: color .25s var(--ease); }
.contact-links a:hover { color: #f5f5f7; }

.footer-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--gutter) 30px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #86868b;
}

/* ---------------- Reveal animation ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint span { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .project-body { grid-template-columns: 1fr; }
  .about > .about-grid { grid-template-columns: 1fr; }
  .process-list li { grid-template-columns: 70px 1fr; gap: 16px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(251, 251, 253, .97);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    padding: 6px var(--gutter) 18px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a {
    font-size: 17px;
    padding: 13px 0;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
  }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }

  .project-gallery { grid-template-columns: 1fr; }
  .g-item.g-wide, .g-item.g-full { grid-column: auto; }
  .project-hero img, .hero-media img { border-radius: 12px; }
  .footer-bar { justify-content: center; text-align: center; }
}
