:root {
  color-scheme: light dark;
  --canvas: #f3f5f7;
  --surface: #fbfcfd;
  --ink: #152231;
  --muted: #536273;
  --line: #cbd5df;
  --accent: #1659aa;
  --accent-soft: #dfeafa;
  --shadow: 0 18px 42px rgb(32 53 77 / 12%);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111925;
    --surface: #172333;
    --ink: #edf3f8;
    --muted: #b5c2cf;
    --line: #34475b;
    --accent: #7aa7e0;
    --accent-soft: #1c3450;
    --shadow: 0 20px 50px rgb(1 8 15 / 38%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.shell {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 4;
  transform: translateY(-170%);
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, calc(100% - 48px));
  min-height: 72px;
  margin-inline: auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: grid;
  gap: 1px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.brand small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  white-space: nowrap;
}

nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 180ms ease;
}

nav a:hover,
nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: clamp(48px, 7vw, 92px);
  min-height: min(760px, calc(100dvh - 72px));
  padding-block: 56px 72px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

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

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.08;
}

h1 {
  max-width: 9ch;
  margin-bottom: 22px;
  font-size: clamp(3.4rem, 8vw, 6.8rem);
  font-weight: 760;
  letter-spacing: 0;
}

h1 span {
  color: var(--accent);
  font-size: 0.68em;
  letter-spacing: 0;
}

.hero-intro {
  max-width: 36ch;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

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

.button-primary:hover,
.button-primary:focus-visible {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
  transform: translateY(-2px);
}

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

.text-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.text-link span,
.project-link span {
  display: inline-block;
  transition: transform 180ms ease;
}

.text-link:hover span,
.text-link:focus-visible span,
.project-feature:hover .project-link span,
.project-feature:focus-visible .project-link span {
  transform: translateX(4px);
}

.hero-visual {
  display: grid;
  min-height: 540px;
  align-items: end;
}

.portrait-frame {
  width: min(100%, 480px);
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
}

section {
  scroll-margin-top: 28px;
}

.now,
.journey,
.projects,
.notes,
.about {
  padding-block: 112px;
}

.section-heading {
  max-width: 640px;
  margin-bottom: 42px;
}

.section-heading h2,
.notes-copy h2,
.about h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.45rem);
  font-weight: 750;
  letter-spacing: 0;
}

.section-heading p,
.notes-copy > p,
.about p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.now-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.now-grid article {
  min-height: 196px;
  padding: 30px;
}

.now-grid article + article {
  border-left: 1px solid var(--line);
}

.now-grid h3,
.note-topics h3 {
  margin-bottom: 12px;
  font-size: 1.16rem;
  letter-spacing: 0;
}

.now-grid p,
.note-topics p {
  margin-bottom: 0;
  color: var(--muted);
}

.journey {
  padding-bottom: 80px;
}

.timeline {
  display: grid;
  gap: 0;
  max-width: 900px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 34px;
  padding: 28px 0;
}

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

.timeline time {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.timeline h3 {
  margin-bottom: 9px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.timeline p {
  max-width: 60ch;
  margin-bottom: 0;
  color: var(--muted);
}

.projects {
  padding-top: 80px;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 22px;
}

.project-feature,
.project-side a {
  position: relative;
  display: block;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-feature {
  min-height: 376px;
  padding: 36px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.project-feature::after {
  position: absolute;
  right: 32px;
  bottom: 32px;
  width: 132px;
  height: 132px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  content: "";
  opacity: 0.38;
}

.project-feature:hover,
.project-feature:focus-visible,
.project-side a:hover,
.project-side a:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.project-kind {
  display: block;
  margin-bottom: 50px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.project-feature h3 {
  max-width: 11ch;
  margin-bottom: 16px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: 0;
}

.project-feature p {
  max-width: 42ch;
  margin-bottom: 28px;
  color: var(--muted);
}

.project-link {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-weight: 750;
}

.project-side {
  display: grid;
  gap: 22px;
}

.project-side a {
  min-height: 177px;
  padding: 28px 30px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

.project-side .project-kind {
  margin-bottom: 30px;
}

.project-side h3 {
  max-width: 21ch;
  margin-bottom: 10px;
  font-size: 1.26rem;
  letter-spacing: 0;
}

.project-side p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.notes {
  display: grid;
  grid-template-columns: minmax(300px, 0.76fr) minmax(0, 1.24fr);
  gap: clamp(40px, 8vw, 118px);
  align-items: center;
}

.notes-visual img {
  width: 100%;
  min-height: 430px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  object-position: right bottom;
}

.notes-copy > p {
  max-width: 50ch;
  margin-bottom: 36px;
}

.note-topics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 42px;
}

.note-topics div {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.about {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  gap: clamp(38px, 8vw, 122px);
  align-items: start;
  padding-top: 88px;
}

.about-mark {
  display: grid;
  width: min(100%, 172px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 780;
  letter-spacing: 0;
}

.about p {
  max-width: 62ch;
  margin-bottom: 16px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-visual {
    animation: settle 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-visual {
    animation-delay: 90ms;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 800px) {
  .shell,
  .site-header {
    width: min(100% - 32px, 680px);
  }

  .site-header {
    align-items: flex-start;
    gap: 12px;
    padding-block: 16px;
  }

  nav {
    justify-content: flex-end;
    gap: 10px;
    overflow-x: auto;
    font-size: 0.82rem;
  }

  nav a:nth-of-type(2),
  nav a:nth-of-type(4) {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 42px;
    min-height: auto;
    padding-block: 52px 72px;
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(3.25rem, 17vw, 5.6rem);
  }

  .hero-visual {
    min-height: 400px;
  }

  .portrait-frame {
    width: min(100%, 420px);
  }

  .now,
  .journey,
  .projects,
  .notes,
  .about {
    padding-block: 76px;
  }

  .now-grid,
  .project-layout,
  .notes,
  .about {
    grid-template-columns: 1fr;
  }

  .now-grid article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-block: 24px;
  }

  .project-feature {
    min-height: 330px;
  }

  .notes {
    gap: 42px;
  }

  .notes-visual img {
    min-height: 330px;
  }

  .about-mark {
    width: 112px;
  }
}

@media (max-width: 440px) {
  .brand small {
    display: none;
  }

  nav a:nth-of-type(5) {
    display: none;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .note-topics {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
