:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #101010;
  --muted: #5f6368;
  --line: #d8d8d3;
  --line-strong: #c3c3bd;
  --green: #006b3f;
  --green-deep: #004f35;
  --red: #d30d18;
  --paper: #faf9f5;
  --shadow: 0 18px 48px rgba(16, 16, 16, 0.12);
  --max: 1220px;
}

* {
  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", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 42px;
  font-size: 15px;
  font-weight: 700;
}

.site-nav a {
  position: relative;
  padding: 22px 0 20px;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--green);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  padding-bottom: 24px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(76px, 8vw, 124px);
  font-weight: 900;
  line-height: 0.98;
}

.hero-line {
  margin: 22px 0 0;
  color: var(--ink);
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 800;
  line-height: 1.16;
}

.hero-text {
  max-width: 610px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button svg {
  width: 23px;
  height: 23px;
  margin-left: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

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

.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.button.primary:hover {
  background: var(--green-deep);
}

.button.ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.hero-visual {
  position: relative;
  margin: 0;
  min-width: 0;
}

.hero-visual::after {
  position: absolute;
  right: 0;
  bottom: 18%;
  width: 120px;
  height: 2px;
  background: var(--green);
  content: "";
}

.hero-visual img {
  width: min(100%, 690px);
  margin-left: auto;
  filter: drop-shadow(0 18px 22px rgba(16, 16, 16, 0.08));
}

.section {
  padding: 28px 0 10px;
}

.section-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.section-heading::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.section-heading a {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}

.work-grid,
.notes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px;
}

.work-card,
.note-card {
  min-height: 150px;
  padding: 24px 24px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.work-card {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px 16px;
}

.work-card:hover,
.note-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.work-icon {
  grid-row: 1 / span 2;
  color: var(--green);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.work-icon.book,
.work-icon.hash {
  color: var(--red);
}

.work-card h3,
.note-card h3 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.35;
}

.work-card p,
.note-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.work-card a {
  position: absolute;
  right: 20px;
  bottom: 12px;
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}

.note-card {
  display: flex;
  flex-direction: column;
}

.note-card time {
  margin-top: auto;
  padding-top: 22px;
  color: var(--green);
  font-size: 14px;
  font-weight: 650;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 48px 0 24px;
  padding: 34px 0 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.contact p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 24px 24px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: auto;
    padding-top: 64px;
  }

  .hero-visual {
    max-width: 620px;
  }

  .hero-visual img {
    margin-left: 0;
  }

  .work-grid,
  .notes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .contact {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .site-header {
    height: 58px;
    padding: 0 18px;
  }

  .brand {
    font-size: 22px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin-left: auto;
    background: var(--ink);
  }

  .site-nav {
    position: absolute;
    top: 58px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    padding: 8px 18px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 0;
  }

  main {
    padding: 0 18px;
  }

  .hero {
    padding: 54px 0 24px;
  }

  .hero h1 {
    font-size: 72px;
  }

  .hero-line {
    font-size: 31px;
  }

  .hero-text {
    font-size: 18px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-visual::after {
    width: 74px;
  }

  .section-heading {
    grid-template-columns: auto 1fr;
  }

  .section-heading a {
    grid-column: 1 / -1;
  }

  .work-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .work-card,
  .note-card {
    min-height: 138px;
  }

  .contact h2 {
    font-size: 30px;
  }

  .site-footer {
    flex-direction: column;
    gap: 6px;
    padding-right: 18px;
    padding-left: 18px;
  }
}
