:root {
  color-scheme: light;
  --ink: #151c29;
  --muted: #515d70;
  --paper: #f5f6f7;
  --line: #dce1e7;
  --blue: #174fa9;
  --blue-dark: #123c80;
  --surface: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
::selection { color: white; background: var(--blue); }

.container {
  width: min(1180px, calc(100% - clamp(40px, 9vw, 120px)));
  margin-inline: auto;
}

.skip {
  position: fixed;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--surface);
}
.skip:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -.035em;
}

.brand img { border-radius: 5px; }

nav {
  align-self: stretch;
  display: flex;
  gap: clamp(18px, 3vw, 40px);
}

nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  position: relative;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 550;
}

nav a:hover, nav .current { color: var(--blue); }

nav .current::after {
  content: "";
  position: absolute;
  height: 2px;
  inset: auto 0 -1px;
  background: var(--blue);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr);
  align-items: stretch;
  margin-top: clamp(34px, 5.2vw, 76px);
  padding-bottom: clamp(40px, 5.6vw, 77px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 25px 24px 28px 0;
}

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

.greeting {
  display: block;
  font-size: clamp(1.6rem, 3.25vw, 3rem);
  font-weight: 680;
  letter-spacing: .005em;
}

.hero-name {
  display: block;
  font-size: clamp(3.9rem, 7.8vw, 7.1rem);
  font-weight: 780;
  line-height: .99;
  letter-spacing: -.082em;
  margin: 8px 0 0 -.055em;
}

.name-period { color: var(--blue); }

.hero-copy p {
  margin-top: 26px;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .9375rem;
  font-weight: 630;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease;
}
.primary { margin-top: 28px; color: white; background: var(--blue); }
.primary:hover { background: var(--blue-dark); }

.hero-image {
  position: relative;
  min-height: clamp(320px, 32vw, 405px);
  overflow: hidden;
  background: #57687a;
  border-radius: 9px;
}

.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.projects {
  padding-block: clamp(34px, 4.4vw, 58px) clamp(48px, 6vw, 80px);
  scroll-margin-top: 24px;
}

.projects h2 {
  margin-bottom: clamp(18px, 2.2vw, 27px);
  font-size: clamp(1.65rem, 2.8vw, 2.5rem);
  line-height: 1.2;
  font-weight: 720;
}

.project {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(15px, 2.5vw, 31px);
  padding: 17px clamp(17px, 2.45vw, 31px) 17px 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.book-art {
  height: 100px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: #e7edf8;
}

.book {
  position: relative;
  display: flex;
  gap: 3px;
  padding: 0 2px 3px;
  background: var(--blue);
  border-radius: 3px;
  transform: rotate(-9deg);
}
.book i {
  display: block;
  width: 22px;
  height: 29px;
  border: 1px solid #adc4ec;
  border-radius: 3px 3px 2px 2px;
  background:
    linear-gradient(#b2c8eb, #b2c8eb) center 8px / 12px 1px no-repeat,
    linear-gradient(#b2c8eb, #b2c8eb) center 13px / 12px 1px no-repeat,
    linear-gradient(#b2c8eb, #b2c8eb) center 18px / 12px 1px no-repeat,
    #fcfdff;
}

.project h3 { font-size: 1.32rem; font-weight: 710; }
.project p { margin-top: 6px; color: var(--muted); line-height: 1.7; }
.secondary { color: var(--blue); border-color: #c7d5eb; }
.secondary:hover { background: #eef4ff; border-color: #a7bee4; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer a:hover { color: var(--blue); }

@media (max-width: 730px) {
  .header-inner { min-height: 62px; }
  .hero { grid-template-columns: 1fr; gap: 27px; }
  .hero-copy { padding: 0; }
  .hero-name { font-size: clamp(3.7rem, 12vw, 6rem); }
  .hero-image { min-height: 0; aspect-ratio: 1.55; }
  .hero-copy p { margin-top: 19px; }
  .primary { margin-top: 21px; }
}

@media (max-width: 520px) {
  .project { grid-template-columns: 69px minmax(0, 1fr); align-items: start; gap: 12px 13px; padding: 14px; }
  .book-art { height: 69px; }
  .project h3 { font-size: 1.2rem; }
  .project .secondary { grid-column: 2; justify-self: start; }
}

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