/* ============================================================
   Meark · 系统面板 — direction: page-is-the-object (seed 1994673433)
   Schibsted Grotesk · Blush / sage / slate · pinned story
   ============================================================ */

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('../fonts/schibsted-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('../fonts/schibsted-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('../fonts/schibsted-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #a6b3bc;
  --surface: #b2bdc5;
  --ink: #1c1c1c;
  --muted: #38424a;
  --accent: #2c3620;
  --accent-ink: #e3e2da;
  --field-1: #a6b3bc;  --field-1-ink: #1c1c1c;
  --field-2: #b7c8be;  --field-2-ink: #1c1c1c;
  --field-3: #d6c4b8;  --field-3-ink: #1c1c1c;
  --field-4: #2c3620;  --field-4-ink: #e3e2da;

  --font: 'Schibsted Grotesk', system-ui, sans-serif;
  --step-small: 13px;
  --step-body: 17px;
  --step-lead: 21px;
  --step-head: 32px;
  --step-title: clamp(40px, 5vw, 72px);

  --margin: clamp(16px, 3vw, 28px);
  --radius: 4px;
  --break: 860px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.4;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul, ol, dl, p, h1, h2, h3, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font);
  font-size: var(--step-body);
  font-weight: 600;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover, .btn:focus-visible {
  background: var(--ink);
  color: var(--accent-ink);
}

/* ---------- Section heads ---------- */
.section-head-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 40px;
}
.section-head {
  font-size: var(--step-head);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-note { font-size: 14px; color: var(--muted); }

/* ============================================================
   HERO · 角色面板卡（pinned story）
   ============================================================ */
.hero {
  min-height: 100svh;
  padding: clamp(48px, 8vh, 90px) var(--margin) 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.panel {
  position: sticky;
  top: 20px;
  width: min(760px, 92vw);
  background: var(--field-3);
  color: var(--field-3-ink);
  border-radius: var(--radius);
  padding: clamp(28px, 3vw, 40px);
  transform-origin: left top;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.panel.is-mini {
  transform: scale(0.3);
}
.panel__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.panel__name {
  font-size: clamp(64px, 6vw, 100px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.panel__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  padding-top: 10px;
}
.panel__body {
  margin-top: clamp(40px, 6vh, 64px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.panel__facts {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.panel__note {
  font-size: var(--step-lead);
  line-height: 1.4;
  max-width: 30ch;
  color: var(--ink);
}
.panel__bottom {
  margin-top: clamp(32px, 5vh, 56px);
  display: flex;
  align-items: center;
  gap: 24px;
}
.panel__credit {
  font-size: 14px;
  color: var(--ink);
  opacity: 0.75;
}
.panel__link {
  margin-left: auto;
  font-size: var(--step-body);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px dotted var(--accent);
}
.panel__link:hover { color: var(--accent); }
.panel-nav {
  margin-top: 40px;
  display: flex;
  gap: 28px;
  font-size: var(--step-body);
}
.panel-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.panel-nav a:hover, .panel-nav a:focus-visible { color: var(--accent); }

/* ============================================================
   INTRO · 大标题 + 状态事实行
   ============================================================ */
.intro {
  padding: clamp(110px, 16vh, 170px) var(--margin) clamp(90px, 14vh, 150px);
}
.intro__head {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  column-gap: 48px;
  align-items: end;
}
.intro__title {
  font-size: var(--step-title);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}
.intro__note {
  font-size: var(--step-body);
  line-height: 1.5;
  padding-bottom: 6px;
}
.facts {
  margin-top: clamp(56px, 9vh, 96px);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fact__value {
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.fact__label {
  font-size: 14px;
  color: var(--muted);
  max-width: 26ch;
}

/* ============================================================
   ABOUT · 档案卡（纸色 sheet + 撕票条）
   ============================================================ */
.about {
  background: var(--surface);
  padding: clamp(80px, 13vh, 130px) var(--margin);
}
.about .section-head { padding-bottom: 48px; }
.sheet {
  width: min(680px, 100%);
  margin: 0 auto;
  background: var(--field-2);
  color: var(--field-2-ink);
  padding: 60px clamp(32px, 5vw, 60px) 0;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 14px) 100%, 0 100%);
}
.sheet__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 17px;
}
.sheet__letter {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: var(--step-body);
  line-height: 1.55;
  max-width: 54ch;
}
.sheet__sign {
  margin-top: 40px;
  font-size: 21px;
  font-weight: 600;
}
.sheet__role {
  font-size: 14px;
  color: var(--muted);
  padding: 6px 0 40px;
}
.sheet__tear {
  margin: 0 calc(-1 * clamp(32px, 5vw, 60px));
  padding: 0 clamp(32px, 5vw, 60px);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 6px dotted var(--field-2-ink);
  font-size: 14px;
}
.sheet__tear-mail { font-weight: 600; }
.sheet__tear-note { color: var(--muted); }

/* ============================================================
   SKILLS · 属性面板
   ============================================================ */
.skills {
  background: var(--field-2);
  color: var(--field-2-ink);
  padding: clamp(80px, 13vh, 130px) var(--margin);
}
.skills .section-note { color: var(--field-2-ink); opacity: 0.72; }
.skill-group {
  max-width: 640px;
  padding-bottom: 44px;
}
.skill-group:last-child { padding-bottom: 0; }
.skill-group__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding-bottom: 14px;
  color: var(--ink);
}
.skill-list { display: grid; gap: 12px; }
.skill {
  display: grid;
  grid-template-columns: 180px 1fr 40px;
  align-items: center;
  gap: 18px;
}
.skill__name { font-weight: 600; font-size: var(--step-body); }
.skill__bar {
  height: 12px;
  background: rgba(28, 28, 28, 0.18);
  border-radius: 6px;
  overflow: hidden;
}
.skill__fill {
  display: block;
  height: 100%;
  width: var(--w, 50%);
  background: var(--accent);
  border-radius: 6px;
}
.skill__val {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   WORK · 任务记录（书脊）
   ============================================================ */
.work {
  background: var(--bg);
  padding: clamp(80px, 13vh, 130px) var(--margin) clamp(56px, 9vh, 90px);
}
.shelf {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.spines {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  min-height: 420px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.spine {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 34px;
  height: 420px;
  padding: 8px 4px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 2px;
  flex: none;
}
.spine__name {
  writing-mode: vertical-rl;
  font-size: 17px;
  line-height: 1.1;
}
.spine__disc {
  writing-mode: vertical-rl;
  padding: 4px 3px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.spine[data-disc="前端"] .spine__disc { background: var(--field-4); color: var(--field-4-ink); }
.spine[data-disc="独立"] .spine__disc { background: var(--field-3); color: var(--field-3-ink); }
.spine[data-disc="规划"] .spine__disc { background: var(--surface); color: var(--ink); }
.spine:hover, .spine:focus-visible, .spine.is-active {
  color: var(--ink);
  background: var(--surface);
}
.record {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.record__title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.record__desc {
  font-size: var(--step-body);
  line-height: 1.5;
  color: var(--ink);
}

/* ============================================================
   GALLERY · 收藏品（照片 + 标签条）
   ============================================================ */
.gallery {
  background: var(--surface);
  padding: clamp(80px, 13vh, 130px) var(--margin);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: start;
}
.tile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  filter: saturate(0.9);
}
.tile__strip {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 0 0 var(--radius) var(--radius);
}
.tile__strip--a { background: var(--field-1); color: var(--field-1-ink); }
.tile__strip--b { background: var(--field-2); color: var(--field-2-ink); }
.tile__strip--c { background: var(--field-3); color: var(--field-3-ink); }
.tile__strip--d { background: var(--field-4); color: var(--field-4-ink); }
.tile__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.tile__row span { opacity: 0.9; }

/* ============================================================
   CONTACT · 访问卡
   ============================================================ */
.contact {
  min-height: 100svh;
  background-image: url('../img/obj-486.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}
.contact__card {
  position: sticky;
  top: 60px;
  margin: 60px 60px 0 auto;
  width: min(380px, calc(100% - 120px));
  background: var(--field-3);
  color: var(--field-3-ink);
  border-radius: 8px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact__title {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.contact__mail {
  font-size: 21px;
  font-weight: 600;
}
.contact__time, .contact__line {
  font-size: 14px;
  color: var(--ink);
}
.btn--block {
  margin-top: 12px;
  width: 100%;
  text-align: center;
  border-radius: 4px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot {
  background: var(--field-4);
  color: var(--field-4-ink);
  padding: 24px var(--margin);
  font-size: 16px;
}
.site-foot p { max-width: 60ch; }

/* ============================================================
   MOTION helpers
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }
[data-drift] { will-change: transform; }

/* ============================================================
   PHONE · ≤ 860px
   ============================================================ */
@media (max-width: 860px) {
  .hero { justify-content: flex-start; padding-top: 32px; }
  .panel { width: 100%; }
  .panel__top { font-size: clamp(24px, 6.5vw, 30px); }
  .panel__name { font-size: clamp(52px, 13vw, 72px); }
  .panel__meta { font-size: 14px; }
  .panel__facts { font-size: 21px; }
  .panel__note { font-size: 17px; }
  .panel__bottom { flex-wrap: wrap; }
  .panel__link { margin-left: 0; }
  .panel-nav { flex-wrap: wrap; gap: 18px; }

  .intro__head { grid-template-columns: 1fr; gap: 20px; }
  .intro__title { font-size: 11vw; }
  .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .fact__value { font-size: 28px; }

  .sheet { padding: 40px 24px 0; }
  .sheet__tear {
    margin: 0 -24px;
    padding: 0 24px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    height: 84px;
  }

  .skill { grid-template-columns: 130px 1fr 32px; gap: 12px; }

  .shelf { grid-template-columns: 1fr; }
  .spines {
    flex-wrap: wrap;
    gap: 10px;
    min-height: 0;
    overflow: visible;
    align-items: baseline;
  }
  .spine {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    width: auto;
    height: auto;
    padding: 6px 8px;
  }
  .spine__name { writing-mode: horizontal-tb; font-size: 17px; }
  .spine__disc { writing-mode: horizontal-tb; padding: 2px 6px; }
  .record { min-height: 0; }

  .tiles { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tile__strip { padding: 10px; }
  .tile__row span:nth-child(3), .tile__row span:nth-child(4) { display: none; }

  .contact__card {
    position: static;
    margin: 0;
    width: 100%;
    border-radius: 8px 8px 0 0;
  }
  .contact { display: flex; align-items: flex-end; min-height: 0; padding-top: 40vh; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .panel { transition: none; }
}
