:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --ink: #172925;
  --muted: #50615b;
  --border: #dcdfd6;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

a { color: inherit; }

a:focus-visible {
  outline: 3px solid #217970;
  outline-offset: 4px;
}

.wrap {
  width: min(1200px, calc(100% - 96px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 2;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 8px 12px;
  transform: translateY(-200%);
  background: #fff;
}

.skip-link:focus { transform: none; }

.site-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 680;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.wordmark img { display: block; }

.nav-link {
  display: inline-block;
  padding: 10px 0 10px 12px;
  color: var(--muted);
  font-size: .9375rem;
  text-decoration: none;
}

.nav-link:hover { color: var(--ink); text-decoration: underline; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(360px, 35vw, 440px);
  overflow: hidden;
  border-radius: 20px;
  background: #142d38;
  color: #f8f7ee;
}

.hero-photo, .hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-photo {
  object-fit: cover;
  object-position: center 35%;
}

.hero::after {
  content: "";
  background: linear-gradient(90deg, rgb(9 26 35 / .86), rgb(9 26 35 / .58) 42%, rgb(9 26 35 / .08) 82%);
}

.hero-content { padding: clamp(32px, 5.6vw, 80px); }

.hero-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
  color: #deeddd;
  font-size: .9375rem;
  letter-spacing: .13em;
}

.hero-label::before {
  content: "";
  width: 17px;
  height: 2px;
  background: #c9d9a2;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.125rem, 7.4vw, 6.65rem);
  font-weight: 400;
  letter-spacing: -.064em;
  line-height: 1.02;
}

.intro {
  margin: 16px 0 24px;
  color: #edf2eb;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.75;
}

.intro-break { display: none; }

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 45px;
  padding: 7px 18px;
  border-radius: 6px;
  background: #f1f0e5;
  color: #172d2b;
  font-size: .9375rem;
  font-weight: 650;
  text-decoration: none;
}

.hero-link:hover { background: #fff; }
.hero-link:focus-visible { outline-color: #f1f0e5; }

.projects {
  margin-block-start: 32px;
  scroll-margin-block-start: 24px;
}

.projects h2 {
  margin: 0 0 13px;
  font-size: 1.4rem;
  line-height: 1.4;
}

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

.project {
  --action-ink: #2b5139;
  --action-paper: #ecf2e6;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(19px, 2.3vw, 28px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fefdf9;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.project.radar {
  --action-ink: #41534b;
  --action-paper: #efeee8;
}

.project:hover {
  border-color: #889e91;
  box-shadow: 0 5px 24px rgb(28 45 36 / .07);
}

.project-type {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-block-end: 14px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 550;
}

.project-type img { border-radius: 9px; }

.project h3 {
  margin: 0;
  font-size: clamp(1.45rem, 2.1vw, 1.8rem);
  letter-spacing: -.04em;
  line-height: 1.3;
}

.project p {
  margin: 6px 0 22px;
  color: var(--muted);
  font-size: .975rem;
}

.project-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  margin-block-start: auto;
  padding-block-start: 13px;
  border-top: 1px solid #e6e7df;
}

.project-action {
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--action-paper);
  color: var(--action-ink);
  font-size: .875rem;
  font-weight: 680;
}

.project:hover .project-action {
  text-decoration: underline;
  text-underline-offset: .18em;
}

.project-domain {
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .8125rem;
  overflow-wrap: anywhere;
}

.site-footer {
  padding-block: 23px 27px;
  color: var(--muted);
}

.site-footer small { font-size: .8125rem; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .hero::after {
    background: linear-gradient(90deg, rgb(9 26 35 / .88), rgb(9 26 35 / .58) 56%, rgb(9 26 35 / .16));
  }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { min-height: 60px; }
  .hero {
    min-height: 346px;
    border-radius: 15px;
  }
  .hero-photo { object-position: 65% 50%; }
  .hero-content { padding: 24px; }
  .intro { margin-block-start: 15px; }
  .intro-break { display: initial; }
  .project-grid { grid-template-columns: 1fr; gap: 12px; }
  .projects { margin-block-start: 24px; }
  .project { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .project { transition: none; }
}
