@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --ink: #f4f1ed;
  --muted: #a6a09a;
  --dim: #716c67;
  --line: rgba(244, 241, 237, 0.16);
  --surface: #121210;
  --surface-2: #1b1a18;
  --paper: #f1eee8;
  --paper-ink: #171614;
  --coral: #ff876b;
  --lilac: #c7b7ff;
  --lime: #dcf372;
  --max: 1220px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: 'Space Grotesk', 'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 16px; line-height: 1.5; }
body.is-light { --ink: #171614; --muted: #69645e; --dim: #8d8780; --line: rgba(23, 22, 20, 0.16); --surface: #e9e5df; --surface-2: #f3f0eb; --paper: #171614; --paper-ink: #f1eee8; color-scheme: light; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.site-shell { overflow: hidden; }
.section-pad { width: min(var(--max), calc(100% - 64px)); margin-inline: auto; }

.site-header { height: 92px; width: min(var(--max), calc(100% - 64px)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; color: var(--coral); font-family: Georgia, serif; font-size: 21px; font-style: italic; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; line-height: 1; letter-spacing: .08em; }
.brand-copy strong { font-size: 15px; font-weight: 700; }
.brand-copy span, .eyebrow, .project-meta, .index-label, .signal-strip, .site-footer, .note-date, .aside-kicker { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .08em; }
.brand-copy span { font-size: 8px; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; margin-right: 20px; }
.nav-link { position: relative; color: var(--muted); font-size: 14px; transition: color .2s ease; }
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after { content: ''; height: 3px; width: 3px; background: var(--coral); border-radius: 50%; position: absolute; left: 50%; bottom: -10px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; border-radius: 50%; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.icon-button:hover { border-color: var(--ink); background: var(--surface-2); }
.language-toggle { min-width: 58px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer; font-size: 12px; transition: border-color .2s ease, background .2s ease; }
.language-toggle:hover { border-color: var(--coral); color: var(--coral); }
.theme-toggle { color: var(--lilac); font-size: 21px; }

.hero { min-height: 650px; position: relative; display: flex; align-items: flex-end; padding-top: 72px; padding-bottom: 84px; isolation: isolate; }
.hero-backdrop { position: absolute; inset: 0; z-index: -2; background-image: url('assets/hero.jpg'); background-size: cover; background-position: center 46%; filter: saturate(.75); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(10, 10, 9, .68); }
body.is-light .hero::before { background: rgba(18, 16, 14, .56); }
body.is-light .hero { --line: rgba(244, 241, 237, .18); }
body.is-light .hero h1,
body.is-light .hero .index-title,
body.is-light .hero .index-stats dd,
body.is-light .hero .text-link { color: #f4f1ed; }
body.is-light .hero .eyebrow,
body.is-light .hero .hero-intro,
body.is-light .hero .index-stats dt { color: #d7d2cc; }
.hero-content { max-width: 690px; }
.eyebrow { color: var(--muted); margin: 0 0 20px; display: flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); display: inline-block; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.045em; }
h1 { margin-bottom: 24px; font-size: 88px; line-height: .94; max-width: 690px; }
h1 em, .contact h2 em { color: var(--coral); font-family: Georgia, 'Songti SC', serif; font-weight: 400; }
.hero-intro { max-width: 440px; color: #d7d2cc; font-size: 16px; line-height: 1.75; margin-bottom: 34px; }
.hero-actions { display: flex; align-items: center; gap: 26px; }
.button { min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; border: 1px solid transparent; font-size: 13px; font-weight: 600; border-radius: 3px; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--coral); color: #201714; }
.button-dark { background: var(--paper-ink); color: var(--paper); }
.text-link { color: var(--ink); font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: color .2s ease, border-color .2s ease; }
.text-link:hover { color: var(--coral); border-color: var(--coral); }
.hero-index { margin-left: auto; width: 190px; align-self: flex-start; margin-top: 60px; padding: 18px 0 0 20px; border-left: 1px solid var(--line); }
.index-label { color: var(--coral); margin-bottom: 28px; }
.index-title { font-family: Georgia, serif; font-size: 25px; line-height: 1.1; letter-spacing: -.03em; margin-bottom: 28px; }
.index-rule, .dialog-rule { width: 100%; height: 1px; background: var(--line); }
.index-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 0; }
.index-stats div { display: flex; flex-direction: column; gap: 5px; }
.index-stats dt { color: var(--muted); font-size: 11px; }
.index-stats dd { font-family: 'DM Mono', monospace; font-size: 15px; margin: 0; }
.scroll-cue { position: absolute; bottom: 20px; right: 0; color: var(--muted); font: 10px 'DM Mono', monospace; letter-spacing: .1em; }
.scroll-cue .scroll-arrow { width: 8px; height: 8px; border-right: 1px solid var(--coral); border-bottom: 1px solid var(--coral); display: inline-block; transform: rotate(45deg); margin: 0 10px 2px 0; }

.signal-strip { min-height: 74px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 46px; color: var(--muted); }
.signal-strip p { margin: 0; }
.signal-strip span { color: var(--coral); margin-left: 8px; }
.signal-strip .signal-year { color: var(--ink); margin-left: auto; }

.projects, .notes, .journal { padding-top: 130px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 38px; }
.section-heading h2 { font-size: 62px; line-height: 1; margin: 0; }
.accent { color: var(--coral); }
.section-lede { max-width: 265px; color: var(--muted); line-height: 1.7; margin: 0 0 4px; font-size: 14px; }
.filter-row { display: flex; gap: 8px; margin-bottom: 24px; }
.filter-btn { background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 10px 14px; cursor: pointer; color: var(--muted); font-size: 12px; transition: all .2s ease; }
.filter-btn span { color: var(--dim); font-family: 'DM Mono', monospace; margin-left: 6px; font-size: 10px; }
.filter-btn:hover, .filter-btn.is-selected { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.filter-btn.is-selected span { color: var(--surface); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
.project-card { min-width: 0; }
.project-card-large { grid-column: span 2; }
.project-image { aspect-ratio: 1.62; position: relative; overflow: hidden; background: var(--surface-2); }
.project-card-large .project-image { aspect-ratio: 2.4; }
.project-image img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.82); transition: transform .5s ease, filter .5s ease; }
.project-card:hover .project-image img { transform: scale(1.04); filter: saturate(1); }
.project-number, .project-arrow { position: absolute; top: 16px; color: #fff; font: 11px 'DM Mono', monospace; }
.project-number { left: 16px; }
.project-arrow { right: 16px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; font-size: 14px; }
.project-meta { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: var(--muted); padding-top: 13px; }
.project-tag { color: var(--lime); }
.project-tag-coral { color: var(--coral); }
.project-tag-lilac { color: var(--lilac); }
.project-card h3 { font-size: 25px; margin: 14px 0 4px; }
.project-card p { color: var(--muted); margin: 0; font-size: 13px; }
.card-action { border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 0 0 5px; margin-top: 22px; cursor: pointer; font-size: 12px; color: var(--ink); }
.card-action span { color: var(--coral); margin-left: 8px; }
.card-action:hover { color: var(--coral); border-color: var(--coral); }
.empty-state { color: var(--muted); padding: 28px 0; border-bottom: 1px solid var(--line); }

.section-heading-compact { margin-bottom: 32px; }
.notes-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr); gap: 70px; border-top: 1px solid var(--line); }
.note-item { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 18px; padding: 22px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.note-item:hover strong { color: var(--coral); }
.note-index { color: var(--coral); font: 12px 'DM Mono', monospace; }
.note-copy { display: flex; flex-direction: column; gap: 4px; }
.note-copy strong { font-size: 18px; font-weight: 500; transition: color .2s ease; }
.note-copy small { color: var(--muted); font-size: 12px; }
.note-date { color: var(--muted); white-space: nowrap; }
.notes-aside { padding: 26px; align-self: start; background: var(--surface-2); }
.aside-kicker { color: var(--lilac); }
.aside-quote { font-family: Georgia, 'Songti SC', serif; font-size: 27px; line-height: 1.3; margin: 56px 0 30px; }
.aside-sign { font-family: Georgia, serif; color: var(--coral); font-size: 22px; }

.journal { padding-bottom: 130px; }
.journal-grid { display: grid; grid-template-columns: 1.35fr .8fr .8fr; gap: 14px; align-items: end; }
.journal-item { margin: 0; position: relative; overflow: hidden; background: var(--surface-2); }
.journal-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; filter: saturate(.75); transition: transform .5s ease, filter .5s ease; }
.journal-item-tall img { aspect-ratio: .84; }
.journal-item:hover img { transform: scale(1.03); filter: saturate(1); }
.journal-item figcaption { position: absolute; left: 16px; right: 16px; bottom: 15px; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.journal-item figcaption span { font: 10px 'DM Mono', monospace; display: block; margin-bottom: 5px; color: var(--coral); }
.journal-item figcaption strong { font-size: 16px; font-weight: 500; }

.contact { display: flex; align-items: center; gap: 26px; padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-mark { width: 68px; height: 68px; display: grid; place-items: center; flex: 0 0 auto; color: var(--surface); background: var(--coral); border-radius: 50%; font-size: 30px; }
.contact h2 { font-size: 43px; line-height: .98; margin: 0; }
.contact .button { margin-left: auto; }
.site-footer { min-height: 82px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.site-footer a { color: var(--ink); }

.detail-dialog { width: min(520px, calc(100% - 40px)); padding: 32px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); color: var(--ink); box-shadow: 0 22px 80px rgba(0,0,0,.35); }
.detail-dialog::backdrop { background: rgba(0,0,0,.62); }
.detail-dialog .dialog-close { position: absolute; top: 18px; right: 18px; font-size: 24px; }
.detail-dialog h2 { font-size: 37px; margin: 0 0 18px; max-width: 420px; }
.detail-dialog #dialog-copy { color: var(--muted); line-height: 1.8; max-width: 420px; margin-bottom: 28px; }
.detail-dialog .dialog-rule { margin-bottom: 24px; }

@media (max-width: 820px) {
  .section-pad, .site-header { width: min(var(--max), calc(100% - 40px)); }
  .site-header { height: 76px; }
  .main-nav { gap: 15px; margin-right: 0; }
  .nav-link { font-size: 12px; }
  .hero { min-height: 650px; padding-top: 68px; }
  h1 { font-size: 60px; }
  .hero-index { width: 160px; margin-top: 52px; }
  .signal-strip { gap: 20px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
  .signal-strip p { font-size: 9px; }
  .signal-strip p:nth-child(3) { display: none; }
  .projects, .notes, .journal { padding-top: 94px; }
  .section-heading h2 { font-size: 48px; }
  .notes-layout { gap: 30px; }
  .note-item { grid-template-columns: 30px 1fr; }
  .note-date { grid-column: 2; }
  .contact h2 { font-size: 34px; }
}

@media (max-width: 560px) {
  .section-pad, .site-header { width: calc(100% - 32px); }
  .site-header { height: 68px; }
  .brand-copy span, .main-nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .hero { min-height: 690px; padding-top: 70px; padding-bottom: 70px; display: block; }
  .hero-backdrop { background-position: 62% center; }
  h1 { font-size: 57px; }
  .hero-intro { font-size: 14px; max-width: 330px; }
  .hero-actions { gap: 18px; align-items: flex-start; flex-direction: column; }
  .hero-index { position: absolute; bottom: 60px; left: 0; width: 100%; margin: 0; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .index-label { margin-bottom: 12px; }
  .index-title { display: none; }
  .index-rule { display: none; }
  .index-stats { max-width: 230px; margin-top: 0; }
  .scroll-cue { display: none; }
  .signal-strip { gap: 14px; }
  .signal-strip p:nth-child(2) { display: none; }
  .signal-strip .signal-year { font-size: 9px; }
  .projects, .notes, .journal { padding-top: 80px; }
  .section-heading { display: block; margin-bottom: 26px; }
  .section-heading h2 { font-size: 42px; margin-bottom: 18px; }
  .section-lede { font-size: 13px; }
  .filter-row { overflow-x: auto; padding-bottom: 3px; }
  .filter-btn { flex: 0 0 auto; }
  .project-grid { display: block; }
  .project-card, .project-card-large { margin-bottom: 42px; }
  .project-card-large .project-image, .project-image { aspect-ratio: 1.2; }
  .project-card h3 { font-size: 23px; }
  .notes-layout { display: block; }
  .notes-aside { margin-top: 38px; }
  .aside-quote { margin: 36px 0 24px; font-size: 24px; }
  .journal-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .journal-item-tall { grid-column: span 2; }
  .journal-item-tall img { aspect-ratio: 1.35; }
  .contact { flex-wrap: wrap; gap: 18px; }
  .contact-mark { width: 52px; height: 52px; font-size: 23px; }
  .contact h2 { font-size: 32px; }
  .contact .button { margin-left: 0; width: 100%; }
  .site-footer { min-height: 106px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 7px; font-size: 9px; }
}
