
  :root {
    /* Skillful dark navy theme — default (no JS needed) */
    --ink: #eaf2fb;
    --ink-2: #b9c8db;
    --paper: #061425;
    --paper-2: #0a1d33;
    --rule: rgba(234, 242, 251, 0.12);
    --muted: rgba(234, 242, 251, 0.55);
    --accent: #39ff88; /* green accent — set by JS, this is fallback */
  }

  [data-theme="cream"] {
    --ink: #0a0e14;
    --ink-2: #1a1f28;
    --paper: #f4f4f1;
    --paper-2: #ebebe6;
    --rule: rgba(10, 14, 20, 0.12);
    --muted: rgba(10, 14, 20, 0.55);
    --accent: #1d6fbf;
  }

  [data-theme="navy"] {
    --ink: #eaf2fb;
    --ink-2: #b9c8db;
    --paper: #061425;
    --paper-2: #0a1d33;
    --rule: rgba(234, 242, 251, 0.12);
    --muted: rgba(234, 242, 251, 0.55);
    --accent: #6fc3ff;
  }

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

  html, body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-feature-settings: 'cv11', 'ss01';
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    transition: background-color 0.4s ease, color 0.4s ease;
  }

  body {
    overflow-x: hidden;
  }

  .serif {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    letter-spacing: -0.025em;
  }

  .mono {
    font-family: 'JetBrains Mono', monospace;
  }

  .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 32px;
  }

  @media (max-width: 720px) {
    .container { padding: 0 20px; }
  }

  /* ------- nav ------- */
  .nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
  }
  .nav.scrolled {
    background: color-mix(in oklab, var(--paper) 80%, transparent);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--rule);
  }
  .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: var(--ink);
  }
  .brand-mark {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: var(--ink);
    color: var(--paper);
    display: grid; place-items: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
  }
  .nav-links a {
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.02em;
    opacity: 0.7;
    transition: opacity 0.2s;
  }
  .nav-links a:hover { opacity: 1; }
  .nav-cta {
    border: 1px solid var(--rule);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--ink);
    text-decoration: none;
    transition: all 0.2s;
  }
  .nav-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  @media (max-width: 720px) {
    .nav-links { display: none; }
  }

  /* ------- hero ------- */
  .hero {
    padding: 180px 0 100px;
    position: relative;
  }
  .hero-meta {
    display: flex;
    gap: 32px;
    align-items: baseline;
    margin-bottom: 80px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .hero-meta .dot {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
  }

  .hero-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(48px, 9vw, 144px);
    line-height: 0.96;
    letter-spacing: -0.025em;
    font-weight: 400;
    margin-bottom: 64px;
    text-wrap: balance;
  }
  .hero-headline {
    font-weight: 500;
  }
  .hero-headline .it {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
  }
  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-top: 80px;
    border-top: 1px solid var(--rule);
    padding-top: 40px;
  }
  .hero-grid p {
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink-2);
    max-width: 460px;
  }
  .hero-grid .ix {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 16px;
  }
  @media (max-width: 720px) {
    .hero { padding: 140px 0 60px; }
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  }

  /* scroll indicator */
  .scroll-cue {
    position: absolute;
    right: 32px;
    bottom: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
  .scroll-cue .line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--rule), transparent);
    animation: scrollLine 2s ease-in-out infinite;
  }
  @keyframes scrollLine {
    0%, 100% { transform: scaleY(1); transform-origin: top; }
    50% { transform: scaleY(0.3); transform-origin: top; }
  }
  @media (max-width: 720px) { .scroll-cue { display: none; } }

  /* ------- ticker ------- */
  .ticker {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 20px 0;
    overflow: hidden;
    background: var(--paper-2);
  }
  .ticker-track {
    display: flex;
    gap: 60px;
    animation: tickerScroll 60s linear infinite;
    white-space: nowrap;
    width: max-content;
  }
  .ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--ink-2);
    letter-spacing: 0.04em;
  }
  .ticker-item .pill {
    font-size: 9px;
    padding: 3px 8px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--muted);
  }
  .ticker-item .change-up { color: #2d7a4f; }
  .ticker-item .change-dn { color: #b14242; }
  @keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

  /* ------- about / stats ------- */
  .section {
    padding: 140px 0;
    border-top: 1px solid var(--rule);
  }
  .section-label {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 60px;
  }
  .section-label .num {
    color: var(--accent);
  }
  .section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
  }

  .two-col {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 80px;
    align-items: start;
  }
  @media (max-width: 920px) {
    .two-col { grid-template-columns: 1fr; gap: 40px; }
  }

  .display-h {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(40px, 5.5vw, 84px);
    line-height: 1;
    letter-spacing: -0.03em;
    font-weight: 500;
    text-wrap: balance;
  }
  .display-h em {
    color: var(--accent);
    font-style: italic;
    font-weight: 400;
  }
  .lede {
    font-size: 19px;
    line-height: 1.55;
    color: var(--ink-2);
    max-width: 560px;
  }
  .lede + .lede { margin-top: 24px; }

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 100px;
    background: var(--rule);
    border: 1px solid var(--rule);
  }
  .stat {
    background: var(--paper);
    padding: 40px 32px;
    transition: background 0.3s ease;
  }
  .stat:hover { background: var(--paper-2); }
  .stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 64px;
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 500;
    margin-bottom: 16px;
  }
  .stat-value sup {
    font-size: 22px;
    color: var(--accent);
    font-style: italic;
    font-weight: 400;
    margin-left: 4px;
  }
  .stat-label {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
  }
  @media (max-width: 920px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
  }

  /* ------- sectors ------- */
  .sectors {
    padding: 140px 0;
    border-top: 1px solid var(--rule);
  }
  .sectors-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 80px;
    gap: 40px;
  }
  .sectors-header .display-h { max-width: 720px; }
  .sectors-header p {
    max-width: 320px;
    font-size: 15px;
    color: var(--ink-2);
    line-height: 1.55;
  }
  @media (max-width: 920px) {
    .sectors-header { flex-direction: column; align-items: start; }
  }

  .sector-row {
    display: grid;
    grid-template-columns: 80px 1fr 1.2fr 1fr;
    gap: 40px;
    padding: 48px 0;
    border-top: 1px solid var(--rule);
    align-items: start;
    cursor: pointer;
    transition: padding 0.3s ease;
    position: relative;
  }
  .sector-row:last-child { border-bottom: 1px solid var(--rule); }
  .sector-row:hover { padding-left: 16px; padding-right: 16px; }
  .sector-row::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: var(--accent);
    transition: width 0.3s ease;
  }
  .sector-row:hover::before { width: 4px; }

  .sector-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
    padding-top: 8px;
  }
  .sector-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 40px;
    line-height: 1;
    letter-spacing: -0.03em;
    font-weight: 500;
  }
  .sector-name em {
    color: var(--accent);
    font-size: 22px;
    font-style: italic;
    font-weight: 400;
    display: block;
    margin-top: 10px;
    letter-spacing: -0.01em;
  }
  .sector-desc {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-2);
  }
  .sector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: start;
    justify-content: end;
  }
  .sector-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    padding: 5px 10px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--ink-2);
    letter-spacing: 0.04em;
  }
  @media (max-width: 920px) {
    .sector-row {
      grid-template-columns: 1fr;
      gap: 16px;
      padding: 32px 0;
    }
    .sector-tags { justify-content: start; }
    .sector-name { font-size: 32px; }
  }

  /* ------- principles ------- */
  .principles {
    padding: 140px 0;
    border-top: 1px solid var(--rule);
    background: var(--paper-2);
  }
  .principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    margin-top: 80px;
  }
  .principle {
    background: var(--paper-2);
    padding: 56px 40px;
    transition: background 0.3s;
    position: relative;
  }
  .principle:hover { background: var(--paper); }
  .principle-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 60px;
  }
  .principle-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 36px;
    line-height: 1;
    letter-spacing: -0.03em;
    font-weight: 500;
    margin-bottom: 20px;
  }
  .principle-title em { color: var(--accent); font-size: 26px; font-style: italic; font-weight: 400; display: block; margin-top: 6px; }
  .principle-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-2);
  }
  @media (max-width: 920px) {
    .principles-grid { grid-template-columns: 1fr; }
  }

  /* ------- portfolio ------- */
  .portfolio {
    padding: 140px 0;
    border-top: 1px solid var(--rule);
  }
  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    margin-top: 80px;
  }
  .pf-cell {
    background: var(--paper);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.3s;
    cursor: default;
  }
  .pf-cell:hover { background: var(--paper-2); }
  .pf-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .pf-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 500;
  }
  .pf-stage {
    font-size: 11px;
    color: var(--ink-2);
    margin-top: 4px;
  }
  @media (max-width: 920px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
    .portfolio-grid .pf-img-wrap { height: 160px; min-height: 160px; max-height: 160px; }
    .portfolio-grid .pf-img-wrap img { height: 160px; }
    .pf-name { font-size: 18px; }
    .pf-cell { padding: 20px 16px; }
  }
  @media (max-width: 480px) {
    .portfolio-grid .pf-img-wrap { height: 130px; min-height: 130px; max-height: 130px; }
    .portfolio-grid .pf-img-wrap img { height: 130px; }
    .pf-name { font-size: 16px; }
    .pf-stage { font-size: 11px; }
  }

  /* ------- contact ------- */
  .contact {
    padding: 160px 0;
    border-top: 1px solid var(--rule);
  }
  .contact-h {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(56px, 10vw, 160px);
    line-height: 0.92;
    letter-spacing: -0.04em;
    font-weight: 500;
    margin-bottom: 80px;
    text-wrap: balance;
  }
  .contact-h em { color: var(--accent); font-style: italic; font-weight: 400; }
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    border-top: 1px solid var(--rule);
    padding-top: 48px;
  }
  .contact-block .lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
  }
  .contact-block p {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
  }
  .contact-block a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
    transition: border-color 0.2s;
  }
  .contact-block a:hover { border-color: var(--accent); }
  @media (max-width: 920px) {
    .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  }

  /* ------- footer ------- */
  .footer {
    padding: 60px 0 40px;
    border-top: 1px solid var(--rule);
    background: var(--paper-2);
  }
  .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.04em;
  }
  .footer-inner .links { display: flex; gap: 24px; }
  .footer-inner a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
  .footer-inner a:hover { color: var(--ink); }


  /* Portfolio images */
  .portfolio-grid .pf-img-wrap {
    display: block;
    width: 100%;
    height: 180px;
    min-height: 180px;
    overflow: hidden;
    border-radius: 2px;
    margin-bottom: 20px;
    flex-shrink: 0;
    background: var(--paper-2);
  }
  .portfolio-grid .pf-img-wrap img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: brightness(0.85) saturate(0.9);
  }
  .pf-img-wrap img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: brightness(0.85) saturate(0.9);
    background: var(--paper-2);
  }
  .pf-cell:hover .pf-img-wrap img {
    transform: scale(1.03);
    filter: brightness(1) saturate(1);
  }

  /* ------- reveal ------- */
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.in {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal-stagger.in > * {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
  .reveal-stagger.in > *:nth-child(2) { transition-delay: 0.1s; }
  .reveal-stagger.in > *:nth-child(3) { transition-delay: 0.15s; }
  .reveal-stagger.in > *:nth-child(4) { transition-delay: 0.2s; }
  .reveal-stagger.in > *:nth-child(5) { transition-delay: 0.25s; }
  .reveal-stagger.in > *:nth-child(6) { transition-delay: 0.3s; }
  .reveal-stagger.in > *:nth-child(7) { transition-delay: 0.35s; }
  .reveal-stagger.in > *:nth-child(8) { transition-delay: 0.4s; }

  /* time / location chip */
  .live-meta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
    background: color-mix(in oklab, var(--paper) 80%, transparent);
    backdrop-filter: blur(12px);
    border: 1px solid var(--rule);
    border-radius: 999px;
    padding: 8px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ink-2);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.04em;
  }
  .live-meta .ldot {
    width: 6px; height: 6px;
    background: #2d7a4f;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
  }

  /* selection */
  ::selection { background: var(--accent); color: var(--paper); }

/* Chinese text should not be italic */
html[lang="zh"] em { font-style: normal; }

/* Language toggle */
.lang-toggle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  transition: all 0.2s;
}
.lang-toggle:hover { border-color: var(--accent); }

/* Chinese text: serif font */
html[lang="zh"] h1, html[lang="zh"] h2, html[lang="zh"] h3 {
  font-family: 'Noto Serif SC', 'Space Grotesk', serif;
}
