:root {
  --bg: #f6f4ff;
  --bg-soft: #fcfbff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.95);
  --surface-tint: rgba(248, 245, 255, 0.9);
  --text: #4f4b69;
  --text-soft: #7d7898;
  --title: #403b5f;
  --primary: #7e86ff;
  --primary-soft: #cfd3ff;
  --accent: #a58bff;
  --peach: #ffd9c8;
  --line: rgba(126, 134, 255, 0.14);
  --line-strong: rgba(126, 134, 255, 0.22);
  --shadow: 0 16px 40px rgba(126, 134, 255, 0.11);
  --shadow-hover: 0 22px 48px rgba(126, 134, 255, 0.16);
  --shadow-soft: 0 12px 30px rgba(126, 134, 255, 0.08);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(207, 211, 255, 0.68), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 230, 221, 0.52), transparent 22%),
    linear-gradient(180deg, #faf8ff 0%, #f6f8ff 40%, #fffdfb 100%);
  min-height: 100vh;
  line-height: 1.82;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  background: rgba(248, 247, 255, 0.68);
  border-bottom: 1px solid rgba(126, 134, 255, 0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  min-width: 0;
}

.brand-mark-img {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  object-fit: contain;
  opacity: 0.96;
  filter: drop-shadow(0 3px 10px rgba(126, 134, 255, 0.12));
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d8dbff, #f8e5ff);
  box-shadow: 0 10px 24px rgba(126, 134, 255, 0.16);
  color: #5d63d8;
  font-size: 20px;
}

.brand-text {
  line-height: 1.35;
}

.brand-text small,
.eyebrow,
.muted,
.text-soft {
  color: var(--text-soft);
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 10px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  line-height: 1.2;
  transition: all 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  box-shadow: 0 10px 24px rgba(126, 134, 255, 0.1);
}

main {
  padding: 34px 0 84px;
}

.hero,
.panel,
.timeline-item,
.quote-card,
.journal-card,
.soft-card,
.info-card,
.presence-card,
.log-item,
.page-title,
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.hero {
  padding: 42px;
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  gap: 30px;
  align-items: center;
}

.hero-compact h1 {
  max-width: 9.5em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  font-size: 14px;
  border: 1px solid rgba(126, 134, 255, 0.12);
  margin-bottom: 14px;
}

h1,
h2,
h3 {
  margin: 0 0 14px;
  line-height: 1.34;
  color: var(--title);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(32px, 3.6vw, 48px);
}

h2 {
  font-size: clamp(24px, 2.8vw, 34px);
}

h3 {
  font-size: clamp(18px, 1.9vw, 24px);
}

p {
  margin: 0 0 14px;
}

.hero-copy p,
.page-title p,
.panel p,
.soft-card p,
.info-card p,
.presence-card p,
.journal-card p,
.log-body p,
.timeline-item p,
.article p,
.clean-list,
.presence-list,
.soft-list {
  color: #6a6686;
}

.cta-row,
.tag-row,
.entry-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cta-row {
  margin-top: 24px;
}

.entry-footer {
  margin-top: 18px;
  align-items: center;
  justify-content: space-between;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 14px 28px rgba(126, 134, 255, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  border: 1px solid rgba(126, 134, 255, 0.12);
}

.btn-secondary:hover,
.text-link:hover,
.footer-links a:hover {
  border-color: rgba(126, 134, 255, 0.22);
  color: #6670f6;
}

.text-link {
  color: var(--primary);
  font-weight: 600;
}

.text-link.inline {
  display: inline;
}

.hero-visual {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(238, 235, 255, 0.95) 0%, rgba(255, 246, 240, 0.88) 60%, rgba(255, 255, 255, 0.7) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.hero-visual-illustrated {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* soft ambient glow behind the figure */
.hero-glow {
  position: absolute;
  inset: 0;
  /* warm ground glow below the figure + soft ambient from top */
  background:
    radial-gradient(ellipse 80% 50% at 60% 100%, rgba(195, 190, 255, 0.32) 0%, transparent 68%),
    radial-gradient(ellipse 55% 45% at 80% 35%, rgba(255, 218, 200, 0.20) 0%, transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 10%, rgba(230, 225, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* subtle floor gradient so figure sits naturally */
.hero-visual::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: linear-gradient(to top, rgba(238, 234, 255, 0.55), transparent);
  pointer-events: none;
  z-index: 2;
  border-radius: 0 0 26px 26px;
}

.hero-portrait-wrap {
  position: absolute;
  right: 5%;
  bottom: 0;
  width: min(66%, 320px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 3;
}

.hero-portrait {
  width: 100%;
  height: auto;
  object-fit: contain;
  /* cutout PNG — just a whisper of bottom fade for grounding */
  -webkit-mask-image: linear-gradient(to top, transparent 0%, black 7%);
  mask-image: linear-gradient(to top, transparent 0%, black 7%);
  /* soft purple drop-shadow gives depth without outline */
  filter: drop-shadow(0 6px 20px rgba(126, 134, 255, 0.13)) drop-shadow(0 2px 6px rgba(180, 160, 255, 0.10));
}

.float-note {
  position: absolute;
  border-radius: 18px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(126, 134, 255, 0.10);
  color: #6c6990;
  font-size: 13px;
  line-height: 1.68;
  box-shadow: 0 8px 20px rgba(126, 134, 255, 0.09);
  max-width: 180px;
  z-index: 5;
  backdrop-filter: blur(8px);
}

.note-one {
  left: 18px;
  bottom: 36px;
}

.section {
  margin-top: 32px;
}

.section-shell {
  padding: 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.2));
  border: 1px solid rgba(126, 134, 255, 0.09);
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading p {
  max-width: 760px;
  color: var(--text-soft);
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.quote-card,
.journal-card,
.soft-card,
.info-card,
.presence-card,
.timeline-item,
.log-item,
.page-title,
.article {
  padding: 26px;
}

.section-intro,
.letter-intro {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 243, 255, 0.84));
}

.kicker {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.list,
.presence-list,
.clean-list,
.soft-list {
  padding-left: 18px;
  margin: 0;
}

.clean-list li + li,
.presence-list li + li,
.soft-list li + li {
  margin-top: 10px;
}

.timeline {
  display: grid;
  gap: 18px;
}

.soft-timeline .timeline-item {
  background: rgba(255, 255, 255, 0.75);
}

.timeline-item {
  position: relative;
  padding-left: 30px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 6px rgba(126, 134, 255, 0.08);
}

.quote-card,
.letter-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 240, 255, 0.96));
}

.quote-card blockquote {
  margin: 0;
  font-size: 24px;
  line-height: 1.75;
  color: #4e4a72;
  white-space: pre-line;
}

.meta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-soft);
  font-size: 14px;
}

.journal-preview,
.feature-band,
.persona-grid,
.recent-notes-grid {
  display: grid;
  gap: 18px;
}

.recent-notes-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(250, 246, 255, 0.34));
}

.recent-notes-heading p {
  max-width: 700px;
}

.recent-notes-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recent-note-card {
  padding: 22px 22px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(126, 134, 255, 0.12);
  box-shadow: var(--shadow-soft);
}

.recent-note-card h3 {
  font-size: clamp(18px, 2vw, 23px);
  margin-bottom: 10px;
}

.recent-note-card p {
  margin-bottom: 0;
  color: #6d6888;
}

.recent-note-card.is-featured p {
  color: #726d8d;
}

.recent-note-time {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(126, 134, 255, 0.08);
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.journal-card small {
  color: var(--text-soft);
}

.page-title {
  margin-bottom: 8px;
}

.page-title p {
  max-width: 760px;
}

.article h2 {
  margin-top: 30px;
}

.article p + p {
  margin-top: 10px;
}

.prose-panel {
  background: rgba(255, 255, 255, 0.84);
}

.journal-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.tag {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(126, 134, 255, 0.08);
  color: var(--primary);
  font-size: 13px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.note-box,
.draft-note {
  padding: 18px;
  border-radius: 20px;
  background: rgba(126, 134, 255, 0.05);
  color: #676384;
  border: 1px dashed rgba(126, 134, 255, 0.16);
}

.draft-note {
  margin-top: 14px;
}

.soft-code {
  margin: 14px 0 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(126, 134, 255, 0.14);
  color: #4f4a70;
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.soft-code code {
  font-family: "SFMono-Regular", "JetBrains Mono", "Fira Code", Consolas, monospace;
}

.soft-inline-note {
  margin: 12px 0 0;
  font-size: 14px;
  color: #7a7695;
}

.compact-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.compact-list li + li {
  margin-top: 8px;
}

.lift-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.lift-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
}

.reserved-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 247, 255, 0.95));
}

.tone-card,
.stack-card,
.portrait-card,
.mini-status-card {
  box-shadow: var(--shadow-soft);
}

.gentle-band {
  align-items: stretch;
}

.mini-status-card h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  margin-bottom: 10px;
}

.journal-list {
  display: grid;
  gap: 18px;
}

.log-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: stretch;
}

.log-index {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  background: linear-gradient(180deg, rgba(207, 211, 255, 0.45), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(126, 134, 255, 0.12);
}

.log-body h3 {
  margin-top: 8px;
}

.is-current .log-index {
  color: #5d63d8;
}

.is-draft {
  opacity: 0.96;
}

.site-footer {
  margin-top: 8px;
  padding: 18px 0 34px;
  border-top: 1px solid rgba(126, 134, 255, 0.08);
  background: rgba(255, 255, 255, 0.3);
}

/* skills.html closing card */
.footer-card {
  margin-top: 3rem;
  padding: 2rem 2.4rem;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  border: 1px solid rgba(126, 134, 255, 0.12);
  text-align: center;
}
.footer-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--title);
}
.footer-card p {
  color: var(--text-soft);
  font-size: 0.95rem;
  max-width: 48ch;
  margin: 0 auto;
}

.footer-inner,
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.footer-inner {
  padding: 10px 0 6px;
}

.footer-inner p,
.footer-bottom p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-soft);
}

.footer-bottom {
  padding-top: 8px;
}


.moments-intro {
  max-width: 700px;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  align-items: start;
}

.polaroid-card {
  position: relative;
  padding: 16px 16px 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  box-shadow: 0 18px 38px rgba(110, 101, 162, 0.14);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
  transform-origin: center center;
}

.polaroid-card:nth-child(3n + 1) {
  transform: rotate(-2.2deg);
}

.polaroid-card:nth-child(3n + 2) {
  transform: rotate(2.8deg);
}

.polaroid-card:nth-child(3n) {
  transform: rotate(-1.1deg);
}

.polaroid-card:hover {
  transform: translateY(-8px) rotate(0deg);
  box-shadow: 0 26px 46px rgba(110, 101, 162, 0.2);
}

.polaroid-frame {
  background: linear-gradient(180deg, #fffefc 0%, #fff9f6 100%);
  border-radius: 16px;
  overflow: hidden;
  min-height: 280px;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.polaroid-frame img,
.polaroid-placeholder {
  width: 100%;
  height: 100%;
}

.polaroid-frame img {
  display: block;
  object-fit: cover;
}

.polaroid-card figcaption {
  padding: 16px 6px 0;
  min-height: 82px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #7a7390;
  letter-spacing: 0.01em;
}

.polaroid-note {
  display: block;
  font-family: "STKaiti", "KaiTi", "PingFang SC", "Hiragino Sans GB", cursive;
}

.polaroid-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #8f89a9;
  text-align: center;
  font-size: 0.94rem;
  line-height: 1.8;
}

.polaroid-placeholder.is-reading {
  background: linear-gradient(135deg, #f8eee8 0%, #fbf6f1 100%);
}

.polaroid-placeholder.is-error {
  background: linear-gradient(135deg, #eef2ff 0%, #f8f4ff 100%);
}

@media (max-width: 900px) {
  .hero,
  .grid-3,
  .grid-2,
  .log-item,
  .footer-inner,
  .footer-bottom,
  .persona-grid,
  .feature-band,
  .recent-notes-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 30px;
  }

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

  .hero-portrait-wrap {
    right: 2%;
    width: min(64%, 260px);
  }

  .log-item {
    grid-template-columns: 1fr;
  }

  .log-index {
    min-height: 72px;
  }

  .entry-footer {
    justify-content: flex-start;
  }

  .footer-inner,
  .footer-bottom {
    display: grid;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark-img {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .brand-text {
    line-height: 1.25;
  }

  .brand-text small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
  }

  .nav-links {
    width: 100%;
    gap: 8px;
    row-gap: 8px;
    justify-content: flex-start;
  }

  .nav-links a {
    padding: 8px 11px;
    font-size: 13px;
    line-height: 1.15;
  }

  main {
    padding: 26px 0 72px;
  }

  .hero,
  .panel,
  .quote-card,
  .journal-card,
  .soft-card,
  .info-card,
  .presence-card,
  .timeline-item,
  .page-title,
  .article,
  .log-item,
  .section-shell {
    padding: 20px;
    border-radius: 22px;
  }

  h1 {
    font-size: 30px;
  }

  .float-note {
    font-size: 14px;
    max-width: 170px;
  }

  .quote-card blockquote {
    font-size: 20px;
  }
}
