@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lora';
  src: url('/fonts/lora-italic.woff2') format('woff2');
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --ink: #111111;
  --ink-soft: #333333;
  --muted: #6b6b6b;
  --faint: #9b9b9b;
  --line: #e7e7e7;
  --line-strong: #cfcfcf;
  --btn-bg: #111111;
  --btn-fg: #ffffff;

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  --shell-max: 1200px;
  --rail-w: 168px;
  --gap: 64px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --bg-soft: #111111;
    --ink: #ededed;
    --ink-soft: #c9c9c9;
    --muted: #969696;
    --faint: #666666;
    --line: #232323;
    --line-strong: #3a3a3a;
    --btn-bg: #ededed;
    --btn-fg: #0b0b0b;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  text-decoration: none;
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* ---------- 布局 ---------- */

.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 48px);
}

.rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  padding: 46px 0 32px;
}

.rail__portrait {
  display: block;
  width: 108px;
  height: 108px;
  margin-bottom: 34px;
  object-fit: cover;
  object-position: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.rail__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail__link {
  width: fit-content;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s ease;
}

.rail__link:hover {
  color: var(--ink);
}

.rail__link.is-active {
  color: var(--ink);
}

.main {
  min-width: 0;
  max-width: 680px;
  padding: 104px 0 56px;
}

.main--wide {
  max-width: none;
}

@media (prefers-reduced-motion: no-preference) {
  .main {
    animation: page-in 0.45s var(--ease) both;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 首页 ---------- */

.hero__top {
  display: block;
}

.hero__name {
  font-size: clamp(3.2rem, 6.4vw, 4.8rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero__role {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.hero__role-tail {
  white-space: nowrap;
}

.hero__intro {
  margin-top: 38px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
}

.hero__intro p:last-child {
  margin-bottom: 0;
}

.contact-icons {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}

.contact-icons a {
  display: inline-flex;
  padding: 6px;
  margin: -6px;
  color: var(--muted);
  transition: color 0.18s ease;
}

.contact-icons a:hover,
.contact-icons a:focus-visible {
  color: var(--ink);
}

.contact-icons a:focus-visible {
  outline: none;
}

.contact-icons svg {
  display: block;
  width: 17px;
  height: 17px;
}

.section {
  margin-top: 68px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.section__head h2 {
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}



.jobs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.job {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
}

.job__logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
}

.job__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.job__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.job__company {
  font-size: 1.03rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.job__period {
  flex: none;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}

.job__role {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.job__summary {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.footer p {
  margin: 0;
}


/* ---------- 内页 ---------- */

.page-head {
  margin-bottom: 44px;
}

.page-title {
  font-size: clamp(2.6rem, 5.4vw, 3.8rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.page-lede {
  max-width: 560px;
  margin: 20px 0 0;
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--muted);
}

.back-link {
  margin: 28px 0 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back-link a {
  display: inline-flex;
  gap: 8px;
  padding-bottom: 2px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}

.back-link a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---------- 照片 ---------- */

.photo-grid {
  columns: 3 180px;
  column-gap: 20px;
  margin-top: 4px;
}

.photo {
  display: block;
  break-inside: avoid;
  margin: 0 0 26px;
  color: inherit;
  text-decoration: none;
}

.photo__frame {
  display: block;
  overflow: hidden;
  background: var(--bg-soft);
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.001);
  transition: transform 0.85s var(--ease);
}

.photo:hover img {
  transform: scale(1.025);
}

/* 照片用标题变色表示键盘焦点，避免整块描边 */
.photo:focus-visible {
  outline: none;
}

.photo__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.photo__title {
  transition: color 0.18s ease;
}

.photo:hover .photo__title,
.photo:focus-visible .photo__title {
  color: var(--ink);
}

.photo__num {
  color: var(--faint);
}

.photo-note {
  max-width: 520px;
  margin: 26px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* 灯箱 */

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f2f2f2;
}

.lightbox::backdrop {
  background: #0a0a0a;
}

.lightbox__bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 242, 242, 0.58);
}

.lightbox__close {
  padding: 8px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.lightbox__close:hover {
  color: #f2f2f2;
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 68px 88px 54px;
}

.lightbox__figure img {
  max-width: min(88vw, 1080px);
  max-height: calc(100vh - 180px);
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: rgba(242, 242, 242, 0.72);
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 1px solid rgba(242, 242, 242, 0.22);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(242, 242, 242, 0.5);
}

.lightbox__nav--prev {
  left: 24px;
}

.lightbox__nav--next {
  right: 24px;
}

body.is-locked {
  overflow: hidden;
}

/* ---------- 留言板 ---------- */

.sign {
  margin-bottom: 62px;
}

.flash {
  margin: 0 0 20px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--ink);
  background: var(--bg-soft);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.flash--error {
  border-left-color: #a33a2b;
  color: #a33a2b;
}

@media (prefers-color-scheme: dark) {
  .flash--error {
    border-left-color: #e08a78;
    color: #e08a78;
  }
}

.note-form {
  margin-top: 18px;
}

.field {
  margin-bottom: 25px;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.18s ease;
}

.field:focus-within {
  border-color: var(--ink);
}







.field__input {
  width: 100%;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

.field__input::placeholder {
  color: var(--faint);
}

.field__input:focus {
  outline: none;
}

.field__textarea {
  min-height: 118px;
  resize: vertical;
}

.field__input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 40px var(--bg) inset;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__actions {
  display: flex;
  align-items: center;
  gap: 10px 20px;
  flex-wrap: wrap;
}

.button {
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.button:hover {
  border-color: var(--ink);
  background: var(--bg-soft);
}

.notes {
  margin-top: 52px;
}

.note-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.note {
  padding: 21px 0 22px;
  border-bottom: 1px solid var(--line);
}

.note:last-child {
  border-bottom: 0;
}

.note__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 6px;
}

.note__name {
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.note__date {
  flex: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.note__body {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pager__link {
  padding-bottom: 2px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.pager__link:hover {
  border-color: var(--ink);
}

.pager__link.is-disabled {
  opacity: 0.4;
}

.pager__count {
  color: var(--faint);
}

/* ---------- 动效偏好 ---------- */

@view-transition {
  navigation: auto;
}

@keyframes vt-out {
  to {
    opacity: 0;
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: vt-out 0.16s ease both;
  }
  ::view-transition-new(root) {
    animation: vt-in 0.24s ease both;
  }
}

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

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  :root {
    --rail-w: 144px;
    --gap: 48px;
  }

  .rail__nav {
    margin-top: 52px;
  }

  .rail__link {
    font-size: 17px;
  }

}

@media (max-width: 860px) {
  .shell {
    display: block;
    padding: 0;
  }

  .rail {
    position: sticky;
    top: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }

  .rail__portrait {
    width: 30px;
    height: 30px;
    margin: 0 14px 0 0;
    border: 0;
  }

  .rail__nav {
    flex-direction: row;
    align-items: baseline;
    gap: 16px;
    margin: 0;
  }

  .rail__link {
    font-size: 15px;
  }

  .main {
    max-width: none;
    padding: 46px 20px 52px;
  }

  .photo-grid {
    columns: 2;
    column-gap: 14px;
  }

  .photo {
    margin-bottom: 20px;
  }

  .page-head {
    margin-bottom: 34px;
  }

  .footer {
    margin-top: 52px;
  }
}

@media (max-width: 620px) {
  .hero__name {
    font-size: clamp(2.5rem, 11.5vw, 3.2rem);
  }

  .hero__role {
    font-size: 1.02rem;
    margin-top: 12px;
  }

  .hero__role-sep {
    display: none;
  }

  .hero__intro {
    margin-top: 30px;
    font-size: 16px;
  }

  .job {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding: 21px 0;
  }

  .job__logo {
    width: 28px;
    height: 28px;
    margin-top: 1px;
    border-radius: 7px;
  }

  .job__head {
    flex-wrap: wrap;
    gap: 2px 12px;
  }

  .job__period {
    font-size: 11px;
  }

  .page-title {
    font-size: clamp(2.3rem, 10vw, 3rem);
  }

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

  .lightbox__bar {
    padding: 14px 16px;
  }

  .lightbox__figure {
    gap: 12px;
    padding: 60px 12px 82px;
  }

  .lightbox__figure img {
    max-width: 94vw;
    max-height: calc(100vh - 190px);
  }

  .lightbox__nav {
    top: auto;
    bottom: 22px;
    width: 40px;
    height: 40px;
    transform: none;
  }

  .lightbox__nav--prev {
    left: calc(50% - 54px);
  }

  .lightbox__nav--next {
    right: calc(50% - 54px);
  }

  .photo__meta {
    font-size: 8.5px;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 380px) {
  .rail__nav {
    gap: 12px;
  }

  .rail__link {
    font-size: 14px;
  }

  .hero__name {
    font-size: 2.3rem;
  }
}
