:root {
  --paper: #f2f0e9;
  --ink: #171813;
  --muted: #6d6d64;
  --line: rgba(23, 24, 19, 0.18);
  --accent: #d8ff3e;
  --blue: #3f5aff;
  --white: #fffef8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { min-height: 100vh; overflow: hidden; }

.topbar {
  height: 88px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 0 clamp(24px, 5vw, 76px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 13px; width: max-content; }
.brand-mark { width: 34px; height: 34px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; transform: rotate(45deg); }
.brand-mark i { display: block; background: var(--ink); border-radius: 2px; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--accent); }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font-size: 16px; letter-spacing: .08em; }
.brand-copy small { font-size: 8px; letter-spacing: .21em; }
.topnav { display: flex; gap: 40px; font-size: 14px; color: var(--muted); }
.topnav a { position: relative; padding: 33px 0 31px; }
.topnav a.active { color: var(--ink); }
.topnav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.submit-button {
  justify-self: end; border: 1px solid var(--ink); background: transparent; border-radius: 999px;
  padding: 11px 18px; cursor: pointer; transition: .2s ease;
}
.submit-button:hover { background: var(--ink); color: var(--white); transform: translateY(-2px); }

.hero {
  min-height: 610px;
  position: relative;
  padding: 72px clamp(24px, 6.7vw, 104px) 42px;
  border-bottom: 1px solid var(--line);
}
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .18em; font-weight: 600; }
.eyebrow span { width: 24px; height: 2px; background: var(--ink); }
.hero-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: clamp(40px, 8vw, 150px); align-items: end; margin-top: 44px; }
.hero h1 { margin: 0; font-size: clamp(66px, 8.7vw, 132px); line-height: .94; letter-spacing: -.075em; font-weight: 600; }
.hero-intro { max-width: 400px; padding-bottom: 10px; }
.hero-intro p { margin: 0 0 34px; color: #52534c; font-size: 16px; line-height: 1.85; }
.hero-intro a { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--ink); padding-bottom: 10px; font-weight: 600; }
.hero-intro a span { font-size: 22px; }
.hero-meta { display: flex; gap: clamp(45px, 7vw, 112px); margin-top: 56px; }
.hero-meta div { display: flex; flex-direction: column; }
.hero-meta strong { font-size: 25px; font-weight: 500; letter-spacing: -.04em; }
.hero-meta span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.hero-orbit { position: absolute; width: 190px; height: 190px; right: -42px; top: 112px; border: 1px solid var(--line); border-radius: 50%; }
.hero-orbit::before { content: ""; position: absolute; inset: 26px; border: 1px solid var(--line); border-radius: 50%; }
.orbit-label { position: absolute; left: 39px; top: 55px; font-size: 8px; line-height: 1.5; letter-spacing: .2em; transform: rotate(-18deg); }
.orbit-dot { position: absolute; width: 13px; height: 13px; background: var(--blue); border-radius: 50%; left: 7px; top: 67px; box-shadow: 0 0 0 8px rgba(63,90,255,.12); }

.projects-section { padding: 80px clamp(24px, 6.7vw, 104px) 110px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 38px; }
.section-heading > div { display: flex; align-items: center; gap: 26px; }
.section-number { font-size: 11px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; }
.section-heading h2 { margin: 0; font-size: 38px; letter-spacing: -.04em; }
.section-heading p { color: var(--muted); font-size: 13px; }
.toolbar {
  display: grid; grid-template-columns: minmax(300px, 1fr) auto auto; align-items: center;
  gap: 28px; padding: 16px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 38px;
}
.search { display: flex; align-items: center; gap: 10px; min-width: 0; }
.search > span { font-size: 25px; transform: rotate(-20deg); }
.search input { width: 100%; border: 0; background: transparent; outline: 0; font-size: 14px; }
.search kbd { color: #898a82; border: 1px solid var(--line); border-radius: 4px; padding: 4px 7px; font-size: 10px; white-space: nowrap; }
.filters { display: flex; align-items: center; gap: 8px; }
.filter {
  border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 8px 11px;
  border-radius: 999px; font-size: 12px; white-space: nowrap;
}
.filter sup { opacity: .6; margin-left: 3px; }
.filter:hover, .filter.active { background: var(--ink); color: var(--white); }
.view-switch { display: flex; border-left: 1px solid var(--line); padding-left: 20px; gap: 3px; }
.view-switch button { border: 0; background: transparent; color: #9b9c94; width: 30px; height: 30px; cursor: pointer; font-size: 18px; }
.view-switch button.active { color: var(--ink); }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 54px 22px; }
.project-card { min-width: 0; }
.project-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.34fr .66fr; background: #e8e6df; }
.preview { height: 300px; overflow: hidden; position: relative; display: block; background: #ddd; }
.featured .preview { height: 480px; }
.preview iframe {
  position: absolute; inset: 0; width: 250%; height: 250%; border: 0; transform: scale(.4); transform-origin: 0 0;
  pointer-events: none; background: white;
}
.featured .preview iframe { width: 200%; height: 200%; transform: scale(.5); }
.preview-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.16)); opacity: .35; transition: .3s; }
.open-chip {
  position: absolute; right: 16px; bottom: 16px; border-radius: 999px; padding: 9px 13px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px); font-size: 11px; font-weight: 600;
  transform: translateY(8px); opacity: 0; transition: .25s ease;
}
.preview:hover .open-chip { transform: translateY(0); opacity: 1; }
.preview:hover .preview-shade { opacity: .75; }
.preview-web { background: #a8b7ff; }
.web-art { position: absolute; inset: 0; padding: 30px; overflow: hidden; }
.web-art i { font-style: normal; position: absolute; right: -10px; bottom: -120px; font-size: 390px; font-weight: 700; line-height: 1; color: rgba(255,255,255,.34); }
.web-art b { font-size: 52px; line-height: .84; letter-spacing: -.08em; font-weight: 600; position: relative; z-index: 1; }
.web-art em { position: absolute; left: 30px; bottom: 30px; font-style: normal; font-size: 9px; letter-spacing: .2em; }
.card-body { padding-top: 18px; display: grid; grid-template-columns: 72px 1fr; }
.featured .card-body { padding: 38px; grid-template-columns: 56px 1fr; }
.card-index { color: var(--muted); font-size: 10px; letter-spacing: .08em; padding-top: 5px; }
.tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tags span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-size: 9px; color: #5d5e56; }
.card-copy h3 { margin: 0; font-size: clamp(22px, 2.3vw, 36px); letter-spacing: -.045em; line-height: 1.18; }
.card-copy h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.card-copy > p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 14px 0 28px; max-width: 520px; }
.card-footer { border-top: 1px solid var(--line); padding-top: 14px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; }
.card-footer a { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); font-size: 15px; transition: .2s; }
.card-footer a:hover { background: var(--ink); color: white; transform: rotate(10deg); }

.project-grid.list { display: block; }
.project-grid.list .project-card,
.project-grid.list .project-card.featured { display: grid; grid-template-columns: 310px 1fr; margin-bottom: 18px; background: transparent; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.project-grid.list .preview, .project-grid.list .featured .preview { height: 176px; }
.project-grid.list .card-body, .project-grid.list .featured .card-body { padding: 8px 0 8px 28px; grid-template-columns: 62px 1fr; }
.project-grid.list .card-copy > p { margin: 8px 0 15px; }
.empty-state { text-align: center; padding: 90px 20px 50px; border-bottom: 1px solid var(--line); }
.empty-state > span { font-size: 42px; }
.empty-state h3 { margin: 10px 0 5px; }
.empty-state p { color: var(--muted); margin: 0 0 20px; }
.empty-state button { border: 0; border-bottom: 1px solid; background: none; cursor: pointer; }

.about {
  display: grid; grid-template-columns: 80px 1.3fr .7fr; gap: 44px; align-items: end;
  padding: 100px clamp(24px, 6.7vw, 104px); background: var(--ink); color: var(--white);
}
.about .section-number { border-color: var(--white); align-self: start; }
.about .eyebrow span { background: var(--accent); }
.about h2 { font-size: clamp(36px, 5vw, 72px); letter-spacing: -.06em; line-height: 1.08; margin: 28px 0 0; }
.about > p { color: #adada5; line-height: 1.9; max-width: 360px; font-size: 14px; }
footer {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  min-height: 190px; padding: 50px clamp(24px, 6.7vw, 104px); background: var(--ink); color: white; border-top: 1px solid #34352e;
}
.footer-brand .brand-mark i { background: white; }
.footer-brand .brand-mark i:nth-child(2), .footer-brand .brand-mark i:nth-child(3) { background: var(--accent); }
footer p { margin: 0; font-size: 14px; }
footer > span { justify-self: end; color: #74756d; font-size: 9px; letter-spacing: .12em; }

dialog {
  width: min(520px, calc(100% - 30px)); border: 0; padding: 44px; color: var(--ink); background: var(--white);
  box-shadow: 0 30px 90px rgba(0,0,0,.3);
}
dialog::backdrop { background: rgba(16,17,13,.65); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; right: 18px; top: 14px; border: 0; background: none; font-size: 28px; cursor: pointer; }
.dialog-kicker { font-size: 9px; letter-spacing: .18em; color: var(--muted); }
dialog h2 { font-size: 38px; margin: 10px 0; letter-spacing: -.05em; }
dialog > p { color: var(--muted); line-height: 1.7; font-size: 13px; }
dialog form { display: grid; gap: 16px; margin-top: 28px; }
dialog label { display: grid; gap: 7px; font-size: 11px; font-weight: 600; }
dialog input, dialog select { width: 100%; border: 1px solid #d2d2ca; background: white; padding: 12px; outline: none; }
dialog input:focus, dialog select:focus { border-color: var(--ink); }
.copy-button { border: 0; background: var(--ink); color: white; padding: 14px; cursor: pointer; margin-top: 4px; }
#copy-status { font-size: 11px; color: #487000; text-align: center; min-height: 16px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-intro { justify-self: end; }
  .toolbar { grid-template-columns: 1fr auto; }
  .filters { grid-row: 2; grid-column: 1 / -1; overflow-x: auto; }
  .project-card.featured { grid-template-columns: 1fr; }
  .featured .preview { height: 390px; }
  .about { grid-template-columns: 50px 1fr; }
  .about > p { grid-column: 2; }
}

@media (max-width: 680px) {
  .topbar { height: 72px; padding: 0 20px; grid-template-columns: 1fr auto; }
  .topnav { display: none; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-copy strong { font-size: 14px; }
  .submit-button { padding: 9px 13px; font-size: 12px; }
  .hero { min-height: auto; padding: 50px 22px 40px; }
  .hero h1 { font-size: clamp(54px, 18vw, 76px); }
  .hero-grid { margin-top: 38px; }
  .hero-intro { padding-left: 14vw; }
  .hero-orbit { display: none; }
  .hero-meta { justify-content: space-between; gap: 8px; margin-top: 46px; }
  .hero-meta strong { font-size: 20px; }
  .projects-section { padding: 62px 20px 80px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: 30px; }
  .section-heading p { display: none; }
  .toolbar { grid-template-columns: 1fr; gap: 12px; }
  .view-switch { display: none; }
  .filters { grid-row: auto; grid-column: auto; margin: 0 -4px; }
  .project-grid { grid-template-columns: 1fr; gap: 46px; }
  .project-card.featured { grid-column: auto; background: transparent; }
  .preview, .featured .preview { height: 260px; }
  .featured .preview iframe { width: 250%; height: 250%; transform: scale(.4); }
  .featured .card-body, .card-body { padding: 16px 0 0; grid-template-columns: 52px 1fr; }
  .open-chip { opacity: 1; transform: none; }
  .project-grid.list .project-card, .project-grid.list .project-card.featured { grid-template-columns: 1fr; }
  .project-grid.list .preview, .project-grid.list .featured .preview { height: 220px; }
  .project-grid.list .card-body, .project-grid.list .featured .card-body { padding: 16px 0 0; }
  .about { grid-template-columns: 1fr; padding: 74px 22px; gap: 34px; }
  .about .section-number { display: none; }
  .about > p { grid-column: auto; }
  footer { grid-template-columns: 1fr; gap: 28px; min-height: auto; padding: 44px 22px; }
  footer > span { justify-self: start; }
  dialog { padding: 36px 24px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
