:root {
  --bg: #f7f7f4;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #64645f;
  --soft: #ecebe5;
  --line: #d9d7ce;
  --accent: #23443b;
  --accent-2: #a06a35;
  --shadow: 0 24px 70px rgba(28, 28, 24, 0.08);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

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

p,
h1,
h2,
h3 {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(217, 215, 206, 0.75);
  background: rgba(247, 247, 244, 0.92);
  backdrop-filter: blur(14px);
}

.header-inner,
.section,
.site-footer {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  margin-left: auto;
}

.header-contact {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.header-contact:hover {
  color: var(--ink);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 700;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a.active,
.site-nav a:hover {
  background: var(--ink);
  color: #fff;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 56px;
  padding-top: 74px;
  padding-bottom: 74px;
}

.hero h1,
.page-hero h1 {
  max-width: 860px;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 span,
.page-hero h1 span {
  color: var(--accent);
}

.hero-copy {
  display: grid;
  gap: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-hook {
  display: inline-block;
  max-width: 760px;
  border: 1px solid rgba(35, 68, 59, 0.18);
  background: rgba(35, 68, 59, 0.08);
  padding: 12px 16px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.hero-copy .target {
  max-width: 680px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.45;
}

.summary-block {
  display: grid;
  gap: 12px;
  color: #34342f;
  font-size: 16px;
}

.hero-panel {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 28px;
}

.hero-photo {
  width: 132px;
  aspect-ratio: 3 / 4;
  display: block;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  object-fit: cover;
  object-position: center top;
}

.hero-panel h2 {
  margin-bottom: 20px;
  font-size: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: #fbfbf8;
  padding: 18px;
}

.metric-card strong {
  font-size: 28px;
  line-height: 1;
  color: var(--accent);
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 88px 0;
}

body[data-page="resume"] .section {
  padding-top: 36px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 48px;
  margin-bottom: 42px;
}

.section-head h2,
.resume-section h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
}

.section-head p {
  color: var(--muted);
  font-size: 18px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.capability {
  border-top: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.55);
  padding: 22px 0 0;
}

.capability h3,
.project-row h3,
.case-study h2,
.workflow-card h3 {
  font-size: 22px;
  line-height: 1.25;
}

.capability p,
.project-row p,
.case-grid p,
.workflow-card li,
.clean-list li {
  color: var(--muted);
}

.project-stack {
  display: grid;
  gap: 18px;
}

.project-row {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 28px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  padding: 5px 10px;
  color: #42423d;
  font-size: 12px;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  background: var(--accent);
  color: #fff;
  padding: 34px;
}

.contact-band h2 {
  font-size: 34px;
  line-height: 1.1;
}

.contact-band p {
  color: rgba(255, 255, 255, 0.78);
}

.contact-list {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer strong {
  display: block;
  color: var(--ink);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.page-hero {
  padding-top: 78px;
  padding-bottom: 54px;
}

.page-hero p {
  max-width: 760px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 20px;
}

.resume-paper {
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 56px;
}

.resume-head {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 26px;
}

.resume-head-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  align-items: start;
  gap: 28px;
}

.resume-photo {
  width: 116px;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  object-fit: cover;
  object-position: center top;
}

.resume-head h1 {
  font-size: 44px;
  line-height: 1;
}

.resume-head p {
  margin-top: 8px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.resume-subtitle {
  margin-top: 8px;
  color: #34342f;
  font-size: 15px;
  font-weight: 700;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.resume-lead {
  color: #34342f;
  font-size: 16px;
  font-weight: 700;
}

.resume-summary {
  display: grid;
  gap: 10px;
}

.resume-summary p {
  color: #34342f;
}

.boss-section {
  background: #fbfbf8;
  margin: 0 -18px;
  padding-left: 18px;
  padding-right: 18px;
}

.resume-section {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.resume-section h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.resume-section ul {
  margin: 0;
  padding-left: 18px;
}

.resume-item + .resume-item {
  margin-top: 28px;
}

.resume-item header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.resume-item h3 {
  font-size: 20px;
}

.resume-item header p,
.resume-item time {
  color: var(--muted);
  font-size: 13px;
}

.resume-highlight {
  margin: 0 0 10px;
  color: #222;
}

.workflow-line + .workflow-line {
  margin-top: 10px;
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  padding-left: 0 !important;
  list-style: none;
}

.skill-list li {
  display: grid;
  gap: 4px;
}

.skill-list span {
  color: var(--muted);
  font-size: 13px;
}

.clean-list {
  margin: 0;
  padding-left: 18px;
}

.clean-list li + li {
  margin-top: 6px;
}

.keyword-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.keyword-row span {
  color: var(--muted);
}

.resume-note {
  color: var(--muted);
  font-size: 13px;
}

.portfolio-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portfolio-link {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  padding: 14px;
}

.portfolio-link span {
  color: var(--muted);
  font-size: 12px;
}

.case-study {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 34px;
  border-top: 1px solid var(--line);
  padding: 44px 0;
}

.case-index {
  color: var(--accent);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.case-content {
  display: grid;
  gap: 22px;
}

.lead {
  max-width: 820px;
  color: #34342f;
  font-size: 20px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.case-grid section {
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}

.case-grid h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.workflow-hero h1 {
  max-width: 980px;
}

.workflow-system {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.workflow-step {
  border-top: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.64);
  padding: 20px 0 0;
}

.workflow-step span {
  display: block;
  margin-bottom: 14px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.workflow-step h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.2;
}

.workflow-step p {
  color: #34342f;
}

.workflow-step ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.workflow-step li + li {
  margin-top: 6px;
}

.workflow-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.workflow-proof-grid article {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 20px;
}

.workflow-proof-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 18px;
}

.workflow-proof-grid p {
  color: var(--muted);
}

.workflow-detail-tight {
  align-items: stretch;
}

.workflow-detail-tight aside {
  border-top: 2px solid var(--ink);
  padding-top: 24px;
}

.workflow-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 24px;
}

.workflow-card ol {
  margin: 18px 0 0;
  padding-left: 20px;
}

.workflow-card li + li {
  margin-top: 10px;
}

.workflow-detail {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 34px;
  align-items: start;
}

.workflow-detail > div {
  border-top: 2px solid var(--ink);
  padding-top: 24px;
}

.print-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.button:hover {
  background: var(--accent);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.button.secondary:hover {
  background: var(--soft);
}

body[data-page="index"] {
  --bg: #f8f8f8;
  --ink: #111111;
  --muted: #666666;
  --soft: #f1f1f1;
  --line: #dedede;
  --accent: #e85d04;
  --accent-2: #8d8d8d;
  background: #f8f8f8;
}

body[data-page="index"] .home-hero {
  display: block;
  min-height: auto;
  padding-top: 86px;
  padding-bottom: 62px;
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 56px;
  align-items: start;
}

body[data-page="index"] .hero-copy {
  max-width: 910px;
  gap: 22px;
}

body[data-page="index"] .hero h1 {
  max-width: 980px;
  font-size: clamp(46px, 8vw, 96px);
  line-height: 0.95;
}

body[data-page="index"] .hero-copy .target {
  max-width: 760px;
  color: #222;
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 700;
  line-height: 1.25;
}

body[data-page="index"] .hero-hook {
  max-width: 980px;
  border-color: rgba(232, 93, 4, 0.28);
  background: rgba(232, 93, 4, 0.08);
  color: #b34302;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 800;
}

.hero-support {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.hero-profile {
  display: grid;
  gap: 18px;
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.hero-profile .hero-photo {
  width: 156px;
  margin-bottom: 0;
}

.hero-profile strong {
  display: block;
  font-size: 18px;
}

.hero-profile span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 48px;
}

.hero-metrics .metric-card {
  min-height: 142px;
  background: #fff;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.hero-metrics .metric-card:hover,
.home-project-card:hover,
.operation-flow article:hover {
  transform: translateY(-2px);
}

.hero-metrics .metric-card span {
  color: #222;
  font-size: 14px;
  font-weight: 700;
}

.hero-metrics .metric-card strong {
  margin: 16px 0 10px;
  color: var(--ink);
  font-size: clamp(29px, 2.8vw, 36px);
  font-variant-numeric: tabular-nums;
}

.hero-metrics .metric-card em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.45;
}

.button {
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.text-link {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding-left: 6px;
  padding-right: 6px;
}

.button.text-link:hover {
  background: transparent;
  color: var(--accent);
}

.operation-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.operation-flow article,
.home-project-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 20px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.operation-flow article:hover,
.home-project-card:hover {
  border-color: rgba(232, 93, 4, 0.45);
}

.operation-flow span {
  display: block;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.operation-flow h3 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.2;
}

.operation-flow p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-project-card {
  display: grid;
  min-height: 250px;
  align-content: space-between;
  gap: 24px;
}

.home-project-card h3 {
  font-size: 24px;
  line-height: 1.2;
}

.home-project-card p {
  color: var(--muted);
}

.home-project-card a {
  width: fit-content;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.ai-band {
  display: grid;
  grid-template-columns: 0.9fr 1fr auto;
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  padding: 30px;
}

.ai-band h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.ai-band p {
  color: var(--muted);
  font-size: 17px;
}

@media (max-width: 860px) {
  .header-inner,
  .section,
  .site-footer {
    width: min(var(--max), calc(100% - 28px));
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .header-meta {
    justify-content: flex-start;
    margin-left: 0;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .section-head,
  .project-row,
  .workflow-detail {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .capability-grid,
  .case-grid,
  .workflow-grid,
  .workflow-system,
  .workflow-proof-grid,
  .skill-list,
  .portfolio-links {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-band,
  .site-footer,
  .resume-item header {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-list {
    text-align: left;
  }

  .resume-paper {
    padding: 28px 20px;
  }

  .resume-head-main {
    grid-template-columns: 1fr 92px;
    gap: 18px;
  }

  .resume-photo {
    width: 92px;
  }

  .case-study {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-top,
  .ai-band {
    grid-template-columns: 1fr;
  }

  .hero-profile {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-template-columns: 104px 1fr;
    padding-left: 0;
    padding-top: 22px;
  }

  .hero-profile .hero-photo {
    width: 104px;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operation-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero h1,
  .page-hero h1 {
    font-size: 42px;
  }

  body[data-page="index"] .hero h1,
  .page-hero h1 {
    font-size: 44px;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hero-metrics .metric-card {
    min-height: 132px;
    padding: 14px;
  }

  .hero-metrics .metric-card span,
  .hero-metrics .metric-card em {
    font-size: 13px;
  }

  .hero-metrics .metric-card strong {
    font-size: 24px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section {
    padding: 62px 0;
  }

  .contact-band {
    padding: 24px;
  }

  .hero-actions .button {
    width: 100%;
    text-align: center;
  }

  .button.text-link {
    border-color: var(--line);
  }

  .operation-flow {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 7mm 9mm;
  }

  :root {
    --bg: #fff;
    --paper: #fff;
    --ink: #111;
    --muted: #444;
    --line: #cfcfcf;
  }

  body {
    background: #fff;
    font-size: 9.2px;
    line-height: 1.25;
  }

  .site-header,
  .site-footer,
  .print-actions {
    display: none !important;
  }

  .section {
    width: 100%;
    padding: 0;
  }

  .resume-paper {
    box-shadow: none;
    padding: 0;
  }

  .resume-head h1 {
    font-size: 22px;
  }

  .resume-head p {
    font-size: 11px;
  }

  .resume-subtitle,
  .resume-contact {
    font-size: 10px;
  }

  .resume-head {
    padding-bottom: 7px;
  }

  .resume-head-main {
    grid-template-columns: minmax(0, 1fr) 62px;
    gap: 10px;
  }

  .resume-photo {
    width: 62px;
  }

  .resume-section {
    padding: 5px 0;
    break-inside: auto;
  }

  .boss-section {
    background: #fff;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .resume-section h2 {
    margin-bottom: 3px;
    font-size: 11.5px;
  }

  .resume-item + .resume-item {
    margin-top: 4px;
  }

  .resume-item header {
    margin-bottom: 2px;
    break-after: avoid;
  }

  .resume-item h3 {
    font-size: 10.6px;
  }

  .resume-item header p,
  .resume-item time {
    font-size: 8.2px;
  }

  .resume-highlight {
    margin-bottom: 2px;
  }

  .clean-list li + li {
    margin-top: 1px;
  }

  .workflow-line + .workflow-line {
    margin-top: 2px;
  }

  .resume-summary {
    gap: 3px;
  }

  .resume-item {
    break-inside: avoid;
  }

  .portfolio-links {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .portfolio-link {
    padding: 8px 0;
    border: 0;
    border-top: 1px solid var(--line);
  }
}
