/* ============================================================
   Shicheng Guo — AcademicPages-style layout · Dark / luxe theme
   Sidebar author profile + top masthead nav + data-driven pages
   ============================================================ */

:root {
  --bg:        #0c0c0e;
  --bg-2:      #111114;
  --surface:   #16161a;
  --surface-2: #1c1c21;
  --line:      rgba(212, 175, 55, 0.16);
  --line-soft: rgba(255, 255, 255, 0.07);

  --gold:      #d4af37;
  --gold-2:    #e8c874;
  --gold-deep: #b8932f;
  --gold-grad: linear-gradient(120deg, #b8932f 0%, #e8c874 50%, #d4af37 100%);

  --text:      #ededf0;
  --text-soft: #c5c5cb;
  --muted:     #8c8c95;
  --faint:     #5d5d66;

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans:  "Inter", "Helvetica Neue", Arial, sans-serif;

  --content-max: 1560px;
  --content-max-wide: 1560px;
  --sidebar-w: 280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--gold-2); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--gold); }

body::before {
  content: ""; position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1000px 640px at 85% -10%, rgba(212,175,55,0.08), transparent 60%),
    radial-gradient(820px 700px at -5% 110%, rgba(212,175,55,0.045), transparent 55%),
    var(--bg);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: .2px; color: var(--text); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3rem); }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1.1em; color: var(--text-soft); }
strong { color: var(--text); font-weight: 600; }

.eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase; color: var(--gold);
  display: inline-block; margin-bottom: .8rem;
}
.gold-text {
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold);
}

/* ============================================================
   Masthead navigation
   ============================================================ */
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(12,12,14,0.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  max-width: var(--content-max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 36px);
}
.masthead__brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--text); letter-spacing: .4px; }
.masthead__brand .mark { color: var(--gold); }
.masthead__nav { display: flex; gap: 14px; align-items: center; list-style: none; margin: 0; padding: 0; }
.masthead__nav a {
  color: var(--text-soft); font-size: .72rem; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; position: relative; white-space: nowrap;
}
.masthead__nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1.5px; width: 0;
  background: var(--gold-grad); transition: width .28s var(--ease);
}
.masthead__nav a:hover { color: var(--text); }
.masthead__nav a:hover::after, .masthead__nav a.active::after { width: 100%; }
.masthead__nav a.active { color: var(--gold); }
.masthead__toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.masthead__toggle span { width: 24px; height: 2px; background: var(--text); transition: .3s; }

/* ============================================================
   Page shell — sidebar + content
   ============================================================ */
.page-wrap {
  max-width: var(--content-max); margin: 0 auto;
  padding: 104px clamp(18px, 4vw, 36px) 40px;
  display: grid; grid-template-columns: var(--sidebar-w) 1fr; gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

/* Wide mode — data/grid pages fill large 16:9 monitors */
body.wide .masthead__inner,
body.wide .page-wrap,
body.wide .site-footer { max-width: var(--content-max-wide); }

/* ---------- Author sidebar ---------- */
.author {
  position: sticky; top: 104px;
  text-align: center;
}
.author__avatar {
  width: 180px; height: 180px; margin: 0 auto 20px;
  border-radius: 50%; object-fit: cover; display: block;
  border: 2px solid var(--line);
  box-shadow: 0 0 0 6px rgba(212,175,55,0.06), 0 18px 50px rgba(0,0,0,0.55);
  filter: grayscale(12%) contrast(1.03);
}
.author__name { font-family: var(--serif); font-size: 1.55rem; color: var(--text); margin: 0 0 4px; }
.author__role { color: var(--gold-2); font-size: .9rem; font-weight: 500; letter-spacing: .02em; margin: 0 0 2px; }
.author__org { color: var(--muted); font-size: .85rem; margin: 0 0 14px; }
.author__bio { color: var(--text-soft); font-size: .9rem; line-height: 1.6; margin: 0 auto 16px; max-width: 240px; }
.author__divider { width: 44px; height: 2px; background: var(--gold-grad); border: 0; margin: 16px auto; }

.author__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; max-width: 220px; margin-inline: auto; }
.author__links a {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-soft); font-size: .86rem; padding: 7px 10px; border-radius: 4px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.author__links a:hover { background: var(--surface); color: var(--gold); }
.author__links .fa, .author__links i { width: 18px; text-align: center; color: var(--gold); font-size: .95rem; }

.author__meta { color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 4px; }
.author__meta i { color: var(--gold); }

/* ---------- Main content ---------- */
.content { min-width: 0; }
.page__title { font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: .15em; }
.page__lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.4em; }
.page__divider { width: 60px; height: 2px; background: var(--gold-grad); border: 0; margin: 0 0 2em; }

/* ---------- Prose (markdown body) ---------- */
.prose > h1:first-child, .content > h1:first-child { margin-top: 0; }
.prose h2 { font-size: 1.7rem; margin-top: 1.7em; padding-bottom: .3em; border-bottom: 1px solid var(--line-soft); }
.prose h3 { font-size: 1.3rem; margin-top: 1.4em; color: var(--gold-2); }
.prose img { border-radius: 8px; border: 1px solid var(--line-soft); margin: 1.5em 0; }
.prose ul, .prose ol { color: var(--text-soft); padding-left: 1.25em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { border-left: 2px solid var(--gold); margin: 1.5em 0; padding: .3em 0 .3em 1.3em; color: var(--text); font-family: var(--serif); font-style: italic; font-size: 1.2rem; }
.prose code { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 4px; padding: 2px 7px; font-size: .9em; color: var(--gold-2); font-family: "SF Mono", Menlo, Consolas, monospace; }
.prose pre { background: #08080a; border: 1px solid var(--line-soft); border-radius: 8px; padding: 18px 20px; overflow-x: auto; margin: 1.5em 0; }
.prose pre code { background: none; border: 0; padding: 0; color: var(--text-soft); }
.prose hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .94rem; }
.prose th, .prose td { border: 1px solid var(--line-soft); padding: 10px 14px; text-align: left; }
.prose th { background: var(--surface); color: var(--text); }
.prose a { border-bottom: 1px solid rgba(212,175,55,0.3); }
.prose a:hover { border-color: var(--gold); }

/* ---------- Intro / highlight cards (home) ---------- */
.lead { font-size: 1.22rem !important; color: var(--text) !important; font-family: var(--serif); line-height: 1.55; }
.highlights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 1.8em 0; }
.hl-card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: 8px; padding: 22px 22px;
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.hl-card:hover { transform: translateY(-4px); border-color: var(--line); }
.hl-card i { color: var(--gold); font-size: 1.2rem; }
.hl-card h3 { font-size: 1.12rem; margin: 10px 0 6px; color: var(--text); }
.hl-card p { font-size: .92rem; color: var(--muted); margin: 0; }

/* ============================================================
   Publications list (academicpages style)
   ============================================================ */
.archive__subtitle {
  font-family: var(--serif); font-size: 1.5rem; color: var(--gold-2);
  margin: 2em 0 .2em; padding-bottom: .3em; border-bottom: 1px solid var(--line);
}
.archive__subtitle:first-of-type { margin-top: .6em; }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.pub-item__title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.3; display: block; color: var(--text); }
a.pub-item__title:hover { color: var(--gold); }
.pub-item__venue { color: var(--muted); font-size: .92rem; margin: 5px 0; }
.pub-item__venue em { color: var(--gold-2); font-style: italic; }
.pub-item__excerpt { color: var(--text-soft); font-size: .95rem; margin: 6px 0 10px; }
.pub-item__cite { color: var(--faint); font-size: .82rem; margin: 0 0 10px; line-height: 1.5; }
.pub-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-links a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  border: 1px solid var(--line); color: var(--gold-2); padding: 6px 13px; border-radius: 3px;
  transition: all .25s var(--ease);
}
.pub-links a:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); }

/* ---------- Generic list (talks / teaching) ---------- */
.list-entry { padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.list-entry__title { font-family: var(--serif); font-size: 1.25rem; color: var(--text); }
a.list-entry__title:hover { color: var(--gold); }
.list-entry__meta { color: var(--muted); font-size: .9rem; margin: 4px 0; }
.list-entry__meta em { color: var(--gold-2); font-style: italic; }
.list-entry__desc { color: var(--text-soft); font-size: .94rem; margin: 6px 0 0; }

/* ---------- Portfolio grid ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 1.4em; }
.portfolio-card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: 10px; padding: 26px;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  position: relative; overflow: hidden;
}
.portfolio-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gold-grad); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.portfolio-card:hover { transform: translateY(-5px); border-color: var(--line); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.portfolio-card:hover::before { transform: scaleX(1); }
.portfolio-card i { color: var(--gold); font-size: 1.5rem; }
.portfolio-card h3 { font-size: 1.25rem; margin: 12px 0 6px; color: var(--text); }
.portfolio-card p { font-size: .94rem; color: var(--muted); margin: 0 0 14px; }
.portfolio-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.portfolio-card .tag { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--line-soft); padding: 3px 9px; border-radius: 20px; }

/* ---------- Trending (live GitHub feed) ---------- */
.trending-toolbar { display: grid; gap: 14px; margin: 1.4em 0 1.8em; }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar-label { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); min-width: 78px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill {
  font-family: var(--sans); font-size: .8rem; font-weight: 500;
  color: var(--text-soft); background: var(--surface); border: 1px solid var(--line-soft);
  padding: 7px 14px; border-radius: 20px; cursor: pointer; transition: all .22s var(--ease);
}
.filter-pill:hover { border-color: var(--line); color: var(--text); }
.filter-pill.is-active { background: var(--gold-grad); color: #1a1408; border-color: transparent; font-weight: 600; }

.trending-status {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line-soft); color: var(--text-soft); font-size: .92rem; margin-bottom: 18px;
}
.trending-status[hidden] { display: none; }
.trending-status.is-error { color: #ff8a8a; border-color: rgba(255,80,80,0.3); background: rgba(255,80,80,0.08); }
.trending-status .spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--gold); border-top-color: transparent; animation: sg-spin .8s linear infinite; flex: none; }
.trending-status.is-error .spin { display: none; }
@keyframes sg-spin { to { transform: rotate(360deg); } }
.trending-updated { font-size: .8rem; color: var(--faint); margin: 12px 0 0; }

.repo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 8px; }
.repo-card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: 10px; padding: 22px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  display: flex; flex-direction: column;
}
.repo-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 18px 44px rgba(0,0,0,0.5); }
.repo-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.repo-card__head h3 { font-family: var(--serif); font-size: 1.18rem; margin: 0; line-height: 1.25; }
.repo-card__head a { color: var(--text); }
.repo-card__head a:hover { color: var(--gold); }
.repo-lang { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2); white-space: nowrap; flex: none; }
.repo-desc { color: var(--muted); font-size: .92rem; margin: 10px 0 12px; flex: 1; }
.repo-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.repo-pill { font-size: .78rem; color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--line-soft); padding: 3px 10px; border-radius: 14px; }
.repo-view { margin-left: auto; font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--gold-2); }
.repo-view:hover { color: var(--gold); }

/* ---------- BD Deals tracker ---------- */
.deal-search {
  width: 100%; font-family: var(--sans); font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px;
  padding: 12px 16px; margin: 1.2em 0 .6em; transition: border-color .2s var(--ease);
}
.deal-search::placeholder { color: var(--faint); }
.deal-search:focus { outline: none; border-color: var(--gold); }

.deal-table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.deal-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 760px; }
.deal-table th {
  text-align: left; font-family: var(--sans); font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2);
  padding: 13px 14px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap;
}
.deal-table .deal-th-date { cursor: pointer; user-select: none; }
.deal-table .deal-th-date:hover { color: var(--gold); }
.deal-table td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); color: var(--text-soft); vertical-align: top; }
.deal-table tbody tr { transition: background .15s var(--ease); }
.deal-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.deal-date { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.deal-value { color: var(--gold-2); font-weight: 600; white-space: nowrap; }
.deal-headline a { color: var(--text); font-weight: 500; }
.deal-headline a:hover { color: var(--gold); }
.deal-source { display: block; color: var(--faint); font-size: .76rem; margin-top: 3px; }
.deal-empty { color: var(--muted); padding: 24px 4px; }

.deal-badge {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 4px; white-space: nowrap;
  border: 1px solid var(--line-soft); color: var(--text-soft);
}
.deal-badge--ma          { color: #ff9e7a; border-color: rgba(255,158,122,0.35); }
.deal-badge--licensing   { color: #7ac6ff; border-color: rgba(122,198,255,0.35); }
.deal-badge--partnership { color: #9ee37a; border-color: rgba(158,227,122,0.35); }
.deal-badge--financing   { color: #c89eff; border-color: rgba(200,158,255,0.35); }
/* clinical-trial outcomes */
.deal-badge--success { color: #5fd98a; border-color: rgba(95,217,138,0.4); background: rgba(95,217,138,0.08); }
.deal-badge--failed  { color: #ff7a7a; border-color: rgba(255,122,122,0.4); background: rgba(255,122,122,0.08); }
.deal-badge--readout { color: var(--gold-2); border-color: rgba(212,175,55,0.35); }
/* AI-in-pharma categories */
.deal-badge--news        { color: var(--gold-2);  border-color: rgba(212,175,55,0.35); }
.deal-badge--research    { color: #9ee37a; border-color: rgba(158,227,122,0.35); }
.deal-badge--fundingdeal { color: #c89eff; border-color: rgba(200,158,255,0.35); }
.deal-badge--regulatory  { color: #7ac6ff; border-color: rgba(122,198,255,0.35); }
.deal-badge--opinion     { color: #ff9e7a; border-color: rgba(255,158,122,0.35); }
.deal-badge--event       { color: #6fe0d0; border-color: rgba(111,224,208,0.35); }
.deal-badge--product     { color: #ff9ec9; border-color: rgba(255,158,201,0.35); }
.deal-badge--datacohort  { color: #7fd1ff; border-color: rgba(127,209,255,0.35); }
.deal-badge--technology  { color: #b6a7ff; border-color: rgba(182,167,255,0.35); }
/* startup-news categories */
.deal-badge--funding     { color: #c89eff; border-color: rgba(200,158,255,0.35); }
.deal-badge--launch      { color: #ff9ec9; border-color: rgba(255,158,201,0.35); }
.deal-badge--breakthrough{ color: #5fd98a; border-color: rgba(95,217,138,0.4); }
.deal-badge--perspective { color: #ff9e7a; border-color: rgba(255,158,122,0.35); }

/* ---------- KOL board ---------- */
.kol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 8px; }
.kol-card {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: 10px; padding: 22px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.kol-card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 18px 44px rgba(0,0,0,0.5); }
.kol-rank { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; line-height: 1; color: transparent;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; min-width: 2.2ch; }
.kol-name { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 2px; color: var(--text); }
.kol-name a { color: var(--text); }
.kol-name a:hover { color: var(--gold); }
.kol-title { color: var(--gold-2); font-size: .9rem; margin-bottom: 10px; }
.kol-note { color: var(--muted); font-size: .92rem; margin: 10px 0 0; }
.kol-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.kol-card .tag { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--line-soft); padding: 3px 9px; border-radius: 20px; }

/* ---------- Conference calendar ---------- */
.conf-list { display: grid; gap: 0; }
.conf-item {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start;
  padding: 20px 4px; border-bottom: 1px solid var(--line-soft);
  transition: padding .25s var(--ease);
}
.conf-item:first-child { border-top: 1px solid var(--line-soft); }
.conf-item:hover { padding-left: 12px; }
.conf-date { font-family: var(--serif); color: var(--gold); font-size: 1.05rem; }
.conf-name { font-family: var(--serif); font-size: 1.28rem; margin: 0 0 4px; color: var(--text); }
.conf-name a { color: var(--text); }
.conf-name a:hover { color: var(--gold); }
.conf-loc { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.conf-loc i { color: var(--gold); }
.conf-item .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.conf-item .tag { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--line-soft); padding: 3px 9px; border-radius: 20px; }
@media (max-width: 560px) { .conf-item { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- CV ---------- */
.cv-section { margin-bottom: 2.2em; }
.cv-entry { display: grid; grid-template-columns: 130px 1fr; gap: 22px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.cv-entry__date { font-family: var(--serif); color: var(--gold); font-size: 1rem; }
.cv-entry__what strong { display: block; color: var(--text); }
.cv-entry__what span { color: var(--muted); font-size: .92rem; }

/* ---------- Blog list ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.post-item__date { color: var(--gold); font-family: var(--serif); font-size: .95rem; }
.post-item__title { font-family: var(--serif); font-size: 1.3rem; color: var(--text); }
.post-item:hover .post-item__title { color: var(--gold-2); }
.post-item__excerpt { color: var(--muted); font-size: .92rem; margin-top: 5px; }
.post-meta { color: var(--muted); font-size: .85rem; margin-bottom: 1.8em; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 24px; }
.back-link:hover { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 28px clamp(18px, 4vw, 36px);
  max-width: var(--content-max); margin-left: auto; margin-right: auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  color: var(--muted); font-size: .82rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }
.visitor { color: var(--muted); text-align: center; flex: 1 1 auto; }
.visitor[hidden] { display: none; }
.visitor #visitorCount { color: var(--text-soft); }
.visitor #visitorLoc { color: var(--muted); }
.visitor__sep { color: var(--faint); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1280px) {
  .page-wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 92px; }
  .author { position: static; max-width: 420px; margin: 0 auto; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
  .author__links { max-width: 280px; }
  .highlights, .portfolio-grid, .repo-grid, .kol-grid { grid-template-columns: 1fr; }
  .masthead__nav {
    position: fixed; inset: 0 0 0 auto; width: min(76vw, 300px);
    flex-direction: column; justify-content: center; gap: 22px;
    background: rgba(13,13,16,0.97); backdrop-filter: blur(18px);
    transform: translateX(100%); transition: transform .35s var(--ease);
    padding: 40px; border-left: 1px solid var(--line);
  }
  .masthead__nav.open { transform: none; }
  .masthead__toggle { display: flex; z-index: 110; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cv-entry, .post-item { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
