/* 居浪 · 求职名片
   Layout after Brittany Chiang's two-column portfolio (sticky identity, scrolling work),
   row rhythm after leerob.com, calendar after Cal.com's booking grid.
   Self-hosted Geist (OFL) for Latin and numerals; Chinese falls through to the system face. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --sunken: #f4f4f5;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --line: #e4e4e7;
  --on-ink: #ffffff;
  --signal: #c2410c;
  --signal-soft: #fff4ea;
  --signal-on-ink: #fdba74;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141416;
    --sunken: #1f1f22;
    --ink: #f4f4f5;
    --ink-2: #d4d4d8;
    --muted: #a1a1aa;
    --faint: #71717a;
    --line: #2c2c31;
    --on-ink: #141416;
    --signal: #fb923c;
    --signal-soft: #2b1c12;
    --signal-on-ink: #c2410c;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--ink) 28%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
a:hover { text-decoration-color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: var(--ink); color: var(--on-ink); border-radius: 8px; z-index: 10; text-decoration: none; }
.skip-link:focus { top: 16px; }

.num, .t-big, .rail-md, .dnum, .mark-time, .cv, .hero-when time { font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */

.layout { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.side { padding: 56px 0 8px; }
.content { padding: 40px 0 48px; }

@media (min-width: 1024px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 88px;
    padding: 0 56px;
  }
  .side { padding: 96px 0 56px; }
  .content { padding: 96px 0 64px; min-width: 0; }
}

@media (min-width: 1024px) and (min-height: 760px) {
  .side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
}

/* ---------- identity ---------- */

.id-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  color: var(--ink);
  font-size: clamp(44px, 6vw, 60px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.id-name span { font-size: 20px; font-weight: 500; letter-spacing: 0; color: var(--muted); }

.id-headline { margin-top: 22px; max-width: 24em; color: var(--ink); font-size: 17px; line-height: 1.65; font-weight: 450; }
.id-edu { margin-top: 8px; color: var(--muted); font-size: 14px; }

.contact-list { margin: 36px 0 0; padding: 0; max-width: 360px; }
.c-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: baseline; padding: 6px 0; }
.c-row dt { color: var(--muted); font-size: 13px; }
.c-row dd { margin: 0; min-width: 0; }
.cv {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  overflow-wrap: anywhere;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.cv:hover { text-decoration-color: currentColor; }
a.cv { text-decoration-color: color-mix(in srgb, var(--ink) 28%, transparent); }
.copy-hint { margin-top: 10px; color: var(--faint); font-size: 12.5px; }

.side-nav { display: none; }

@media (min-width: 1024px) {
  .side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 56px; }
  .side-nav a {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    padding: 6px 0;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: color .15s ease;
  }
  .side-nav i { display: block; width: 28px; height: 1px; background: var(--faint); transition: width .2s ease, background-color .2s ease; }
  .side-nav a:hover,
  .side-nav a.active { color: var(--ink); }
  .side-nav a:hover i,
  .side-nav a.active i { width: 56px; background: var(--ink); }
}

/* ---------- sections ---------- */

.content > section + section { margin-top: 80px; }
.content > .schedule + .strip { margin-top: 28px; }

.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 18px; }
.section-heading h2 { color: var(--ink); font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.section-heading .range { color: var(--muted); font-size: 13px; }
.strip .section-heading h2 { font-size: 14px; font-weight: 550; color: var(--muted); }

/* ---------- next interview ---------- */

.hero-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; color: var(--ink); font-size: 17px; line-height: 1.45; }
.hero-what strong { font-size: 26px; font-weight: 650; letter-spacing: -0.01em; }
.hero-what .hero-city { color: var(--muted); }
.hero-when { margin-top: 8px; color: var(--muted); font-size: 14px; }
.hero-when time { color: var(--ink); font-weight: 550; margin-left: 4px; }
.countdown { display: none; }
.js .countdown { display: inline; }
.countdown b { color: var(--ink); font-weight: 550; font-variant-numeric: tabular-nums; }

/* ---------- two-week calendar ---------- */

.weekdays,
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.weekdays { margin-bottom: 8px; color: var(--faint); font-size: 12px; text-align: center; }
.days { list-style: none; margin: 0; padding: 0; }

.day {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 96px;
  min-width: 0;
  padding: 8px 10px 10px;
  border-radius: 10px;
  background: var(--sunken);
}
.day.weekend { background: transparent; }
.dnum { color: var(--ink-2); font-size: 14px; font-weight: 550; line-height: 1.2; }
.day.weekend .dnum { color: var(--muted); }
.day.gone:not(.busy) { background: transparent; box-shadow: none; }
.day.gone:not(.busy) .dnum { color: var(--faint); }
.day.today { box-shadow: inset 0 0 0 1.5px var(--ink); }
.day.today .dnum::after { content: "今天"; margin-left: 6px; font-size: 11px; font-weight: 500; color: var(--muted); }

.marks { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mark { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mark-time { font-size: 13px; font-weight: 600; white-space: nowrap; }
.mark-sfx { display: block; font-size: 11.5px; font-weight: 500; }
.mark-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .78; }
.mark.scheduled.pending .mark-time::after { content: " 待确认"; font-weight: 500; font-size: 11px; }

.day.has-interview { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.day.has-interview .dnum { color: var(--on-ink); }
.day.has-interview.today .dnum::after { color: var(--on-ink); opacity: .7; }
.day.has-interview .mark.deadline { color: var(--signal-on-ink); }

.day.busy:not(.has-interview) { background: var(--signal-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--signal) 40%, transparent); }
.day.busy:not(.has-interview).today { box-shadow: inset 0 0 0 1.5px var(--signal); }
.mark.deadline { color: var(--signal); }

/* ---------- all arrangements ---------- */

.groups { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.day-group { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 0 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.date-rail { display: flex; flex-direction: column; line-height: 1.5; }
.rail-md { color: var(--ink); font-size: 14px; font-weight: 550; }
.rail-dow { color: var(--muted); font-size: 13px; }
.day-cards { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.interview-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; transition: opacity .2s ease; }
.company-name { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 14px; line-height: 1.5; }
.company-name .co { color: var(--ink); font-weight: 550; }
.company-name .city { color: var(--muted); }
.interview-card h3 { margin-top: 2px; color: var(--ink-2); font-size: 15px; font-weight: 450; line-height: 1.5; }
.card-note { margin-top: 4px; color: var(--muted); font-size: 13px; }
.card-time { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.t-big { color: var(--ink); font-size: 15px; font-weight: 600; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.badge.pending::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.interview-card.deadline .t-big,
.badge.deadline { color: var(--signal); }
.badge.deadline::before { background: var(--signal); }
.interview-card.past { opacity: .42; }

/* ---------- resumes ---------- */

.resume-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 16px; }
.resume-card { display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none; }
.thumb {
  display: block;
  aspect-ratio: 1240 / 1754;
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .18s ease, transform .18s ease;
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.resume-card:hover .thumb,
.resume-card:focus-visible .thumb { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--ink), 0 14px 28px -14px rgb(0 0 0 / .35); }
.rc-label { color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.4; }
.rc-target { margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* ---------- projects ---------- */

.project-grid { border-top: 1px solid var(--line); }
.project { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.pj-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.pj-top h3 { color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }
.pj-sub { color: var(--muted); font-size: 14px; }
.pj-links { display: flex; gap: 16px; margin-left: auto; font-size: 13.5px; }
.pj-hl { margin-top: 6px; color: var(--ink-2); font-size: 14.5px; line-height: 1.7; max-width: 40em; }
.pj-stack { margin-top: 6px; color: var(--muted); font-size: 12.5px; }

.foot { margin-top: 72px; color: var(--faint); font-size: 12.5px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 13px;
  z-index: 20;
}

/* ---------- small screens ---------- */

@media (max-width: 1023px) {
  .content { max-width: 720px; }
  .side { max-width: 720px; }
}

@media (max-width: 640px) {
  .id-name { font-size: 44px; }
  .id-headline { font-size: 16px; margin-top: 18px; }
  .contact-list { margin-top: 28px; }
  .content > section + section { margin-top: 64px; }
  .hero-what strong { font-size: 22px; }

  .weekdays, .days { gap: 4px; }
  .day { min-height: 68px; padding: 6px 5px 7px; border-radius: 8px; gap: 4px; }
  .dnum { font-size: 13px; }
  .day.today .dnum::after { content: none; }
  .mark-time { font-size: 11.5px; letter-spacing: -0.01em; }
  .mark-sfx, .mark-name { display: none; }
  .mark.scheduled.pending .mark-time::after { content: none; }

  .day-group { grid-template-columns: 1fr; gap: 6px; }
  .date-rail { flex-direction: row; gap: 8px; }

  .resume-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .rc-target { font-size: 12px; }
  .pj-links { margin-left: 0; width: 100%; }
}

/* ---------- résumé view ---------- */

.resume-view { background: var(--sunken); }
.rv-wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }
.rv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 22px 0; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 15px; font-weight: 550; text-decoration: none; }
.back:hover { text-decoration: underline; text-underline-offset: 3px; }
.rv-actions { display: flex; gap: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  transition: box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn.primary { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }

.rv-head h1 { margin: 20px 0 16px; color: var(--ink); font-size: clamp(24px, 3.4vw, 32px); font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
.rv-switch { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.rv-switch a { padding: 6px 12px; border-radius: 7px; color: var(--muted); font-size: 13.5px; text-decoration: none; transition: color .15s ease; }
.rv-switch a:hover { color: var(--ink); }
.rv-switch a[aria-current="page"] { background: var(--ink); color: var(--on-ink); }

.sheets { display: flex; flex-direction: column; gap: 24px; margin: 28px 0 8px; }
.sheet { margin: 0; overflow: hidden; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .06), 0 16px 40px -18px rgb(0 0 0 / .25); }
.sheet img { display: block; width: 100%; height: auto; }
.rv-foot { padding: 16px 0 48px; color: var(--faint); font-size: 12.5px; }

@media (max-width: 640px) {
  .rv-actions .btn:not(.primary) { display: none; }
}

@media (prefers-color-scheme: dark) {
  .thumb img, .sheet img { filter: brightness(.94); }
}

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