:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #0071e3;
  --card: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.72);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000;
    --bg-alt: #111113;
    --text: #f5f5f7;
    --text-muted: #a1a1a6;
    --line: #2c2c2e;
    --accent: #2997ff;
    --card: #1c1c1e;
    --nav-bg: rgba(0, 0, 0, 0.72);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-alt: #111113;
  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --line: #2c2c2e;
  --accent: #2997ff;
  --card: #1c1c1e;
  --nav-bg: rgba(0, 0, 0, 0.72);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 16px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--text-muted);
  font-size: 13px;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

/* Layout */
.container { max-width: 1024px; margin: 0 auto; padding: 0 16px; }
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

/* Hero */
.hero { text-align: center; padding: 140px 0 120px; }
.eyebrow {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.hero p {
  font-size: clamp(19px, 2.4vw, 24px);
  color: var(--text-muted);
  max-width: 640px;
  margin: 24px auto 0;
  letter-spacing: -0.01em;
}
.cta { margin-top: 36px; display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.cta a { font-size: 19px; }

.page-head { text-align: center; padding: 110px 0 40px; }
.page-head h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.page-head p {
  font-size: 21px;
  color: var(--text-muted);
  margin: 16px auto 0;
  max-width: 600px;
}

.section-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 56px;
}

/* Portfolio cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card);
  border-radius: 22px;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  color: var(--text);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
a.card:hover {
  text-decoration: none;
  transform: scale(1.015);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
.card .tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card h3 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 8px;
}
.card p { font-size: 17px; color: var(--text-muted); margin-top: 12px; }
.card .more { margin-top: auto; padding-top: 32px; color: var(--accent); font-size: 17px; }

/* Prose (About) */
.prose { max-width: 680px; margin: 0 auto; }
.prose h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 56px 0 14px;
}
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 19px; color: var(--text-muted); margin-bottom: 16px; }
.prose strong { color: var(--text); font-weight: 600; }

/* Contact */
.offices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.office {
  background: var(--card);
  border-radius: 18px;
  padding: 32px;
}
.office .city { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.office .role {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.office address {
  font-style: normal;
  font-size: 17px;
  color: var(--text-muted);
  margin-top: 16px;
  line-height: 1.6;
}
.office.photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: #1d1d1f;
  background-size: cover;
  background-position: center;
}
.office.photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.78) 100%);
}
.office.photo .city,
.office.photo address { color: #ffffff; }
.office.photo .role { color: rgba(255, 255, 255, 0.75); }
.office.chicago { background-image: url("images/chicago.jpg"); }
.office.hongkong { background-image: url("images/hongkong.jpg"); }


.contact-lines {
  text-align: center;
  font-size: 21px;
}
.contact-lines div { margin-bottom: 10px; }
.contact-lines span { color: var(--text-muted); margin-right: 8px; }

/* Footer */
footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-muted);
}
.footer-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
footer a { color: var(--text-muted); }

@media (max-width: 600px) {
  .nav-links { gap: 18px; }
  .hero { padding: 96px 0 80px; }
  .section { padding: 64px 0; }
  .card { padding: 36px 28px; min-height: 280px; }
}
