:root {
  color-scheme: light;
  --paper: #f3f2ed;
  --ink: #141412;
  --quiet: #71716a;
  --line: rgba(20, 20, 18, .24);
  --accent: #c9f24a;
  --pad: clamp(1.1rem, 2.4vw, 2.4rem);
  --sans: Arial, "Helvetica Neue", Helvetica, "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }

.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 4.5rem;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
}
.home-header a { text-decoration: none; font-size: .84rem; font-weight: 700; }
.home-header p { margin: 0; color: var(--quiet); font-size: .72rem; }

.identity {
  min-height: min(40rem, calc(100svh - 4.5rem));
  display: flex;
  align-items: center;
  padding: clamp(3rem, 6vw, 6rem) var(--pad);
  border-bottom: 1px solid var(--line);
}
.identity-content {
  width: 100%;
  display: grid;
  grid-template-columns: clamp(9rem, 12vw, 12rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 6rem);
}
.avatar {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border: 1px solid var(--ink);
  background: #fff;
}
.identity h1 { margin: 0; max-width: 38rem; font-size: clamp(1.05rem, 1.25vw, 1.35rem); font-weight: 400; line-height: 1.6; letter-spacing: -.015em; }
.identity h1 strong { font-weight: 600; }
.identity h1 span { color: var(--quiet); }

.entrances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.entrances a { min-height: 12rem; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; gap: .5rem; padding: var(--pad); border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); text-decoration: none; transition: background .2s ease; }
.entrances a:hover { background: var(--accent); }
.entrances span { font-size: clamp(1.7rem, 4vw, 4rem); font-weight: 500; letter-spacing: -.05em; }
.entrances small { align-self: end; color: var(--quiet); font-size: .76rem; }
.entrances b { grid-column: 2; grid-row: 1 / -1; font-size: 1.2rem; font-weight: 400; }

.projects { padding: clamp(5rem, 10vw, 10rem) var(--pad); border-bottom: 1px solid var(--ink); }
.projects > header, .about { display: grid; grid-template-columns: 1fr 3fr; gap: var(--pad); }
.projects > header { margin-bottom: clamp(3rem, 7vw, 7rem); }
.projects header p, .about > p { margin: .35rem 0 0; color: var(--quiet); font-size: .72rem; }
.projects h2, .about h2 { margin: 0; max-width: 18ch; font-size: clamp(2.5rem, 5.4vw, 5.5rem); font-weight: 500; line-height: 1; letter-spacing: -.055em; }
.project-list { border-top: 1px solid var(--ink); }
.project-list a { display: grid; grid-template-columns: 4rem 1fr auto 2rem; align-items: center; gap: 1rem; min-height: 5.2rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.project-list a:hover h3 { text-decoration: underline; text-underline-offset: .3rem; text-decoration-thickness: 1px; }
.project-list span, .project-list p, .project-list b { font-size: .72rem; font-weight: 400; }
.project-list span, .project-list p { color: var(--quiet); }
.project-list h3 { margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.8rem); font-weight: 500; letter-spacing: -.03em; }
.project-list p { margin: 0; }

.about { padding: clamp(5rem, 10vw, 10rem) var(--pad); border-bottom: 1px solid var(--ink); }
.about > div { display: grid; gap: clamp(2rem, 5vw, 5rem); }
.about > div > p { max-width: 35rem; margin: 0; color: var(--quiet); font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.7; }

.principles { padding: clamp(5rem, 10vw, 10rem) var(--pad); border-bottom: 1px solid var(--ink); }
.principles p { margin: 0; font-size: clamp(2.4rem, 5.7vw, 6rem); line-height: 1.05; letter-spacing: -.06em; }
.principles p:nth-child(2) { color: var(--quiet); }
.principles p:nth-child(3) { color: #a0a09a; }

footer { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; padding: 1.3rem var(--pad) 3.5rem; font-size: .72rem; }
footer p { margin: 0; }
footer a { text-underline-offset: .2rem; }
footer p:last-child { margin-left: auto; }

@media (max-width: 720px) {
  .home-header p { max-width: 13rem; text-align: right; }
  .identity { min-height: 60svh; padding-block: 3rem; }
  .identity-content { grid-template-columns: 1fr; gap: 1.5rem; }
  .avatar { width: 5.5rem; }
  .identity h1 { max-width: 30rem; font-size: clamp(1.05rem, 4.5vw, 1.25rem); }
  .entrances { grid-template-columns: 1fr; }
  .entrances a { min-height: 9rem; }
  .projects > header, .about { grid-template-columns: 1fr; gap: 2rem; }
  .project-list a { grid-template-columns: 2.2rem 1fr 1.2rem; }
  .project-list p { display: none; }
  footer p:last-child { width: 100%; margin-left: 0; }
}

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