@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Quicksand:wght@300;400;500;600;700&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Quicksand', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  background: #f5f5f5;
  color: #1f1f1f;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Caveat', 'PingFang SC', cursive;
  color: #1f1f1f;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin-bottom: 1em; font-size: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: #1f1f1f;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.65; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

hr {
  border: none;
  border-top: 1.5px solid rgba(31,31,31,0.12);
  margin: 1rem 0 1.2rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Page Wrapper ── */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ── */
.site-header {
  background: #ffffff;
  border-bottom: 1.5px solid rgba(31,31,31,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(31,31,31,0.06);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(31,31,31,0.06);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.brand-name {
  font-family: 'Caveat', cursive;
  font-size: 1.55rem;
  font-weight: 700;
  color: #1f1f1f;
  letter-spacing: 0.02em;
}

.brand-tagline {
  font-size: 0.78rem;
  color: rgba(31,31,31,0.5);
  font-weight: 400;
  display: none;
}

.nav-contact {
  font-size: 0.85rem;
  color: rgba(31,31,31,0.6);
  font-weight: 500;
}

/* ── Nav ── */
.site-nav {
  background: #ffffff;
  padding: 0 2rem;
}

.nav-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1f1f1f;
  white-space: nowrap;
  border-bottom: 2.5px solid transparent;
  transition: border-color 0.2s, color 0.2s;
  min-height: 44px;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: #1f1f1f;
  border-bottom-color: #1f1f1f;
  opacity: 1;
}

/* ── Main ── */
.site-main {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.main-article {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* ── Aside / Sidebar ── */
.sidebar-aside {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 90px;
  align-self: flex-start;
}

.aside-inner {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.25rem 1.1rem;
  box-shadow: 0 4px 16px rgba(31,31,31,0.06);
  border: 1px solid rgba(31,31,31,0.07);
}

.aside-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: 'Caveat', cursive;
}

.aside-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.aside-nav-link {
  display: block;
  padding: 0.45rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(31,31,31,0.7);
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-nav-link:hover {
  background: #f5f5f5;
  color: #1f1f1f;
  opacity: 1;
}

/* ── Content Body ── */
.content-body {
  flex: 1;
  min-width: 0;
}

/* ── Hero ── */
.hero-section {
  background: #ffffff;
  border-radius: 24px;
  padding: 3rem 2.5rem;
  margin-bottom: 2rem;
  min-height: 45vh;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 24px rgba(31,31,31,0.05);
  border: 1px solid rgba(31,31,31,0.06);
  overflow: hidden;
  position: relative;
  scroll-margin-top: 80px;
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-h1 {
  margin-bottom: 1rem;
  text-align: left;
  font-size: clamp(2rem, 4.5vw, 3rem);
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(31,31,31,0.65);
  max-width: 600px;
  margin-bottom: 0;
  font-weight: 400;
}

.hero-icon {
  flex-shrink: 0;
  align-self: flex-start;
  padding-top: 0.5rem;
}

.hero-emoji {
  font-size: 3.5rem;
  line-height: 1;
  opacity: 0.18;
  display: block;
  font-family: 'Caveat', cursive;
}

/* ── Bento Grid ── */
.bento-intro-section {
  margin-bottom: 2rem;
}

.bento-grid {
  display: grid;
  gap: 16px;
}

.bento-grid-intro {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
}

.bento-card {
  border-radius: 24px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(31,31,31,0.07);
}

.bento-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(31,31,31,0.10);
}

.bento-card-wide {
  grid-column: span 3;
}

.bento-card-tall {
  grid-column: span 1;
  grid-row: span 1;
}

.bento-accent {
  background: #1f1f1f;
  color: #ffffff;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.bento-accent .card-eyebrow {
  color: rgba(255,255,255,0.55);
}

.bento-accent .card-keyword {
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

/* ── Glass Card ── */
.glass-card {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 4px 24px rgba(31,31,31,0.07);
  border-radius: 10px;
}

.card-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(31,31,31,0.45);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  font-family: 'Caveat', cursive;
}

.card-body {
  font-size: 0.9rem;
  color: rgba(31,31,31,0.7);
  margin: 0;
  line-height: 1.6;
}

/* ── Page Content Section ── */
.page-content-section {
  margin-bottom: 2rem;
}

.page-content-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Content HTML styles */
.page-content-inner section {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(31,31,31,0.05);
  border: 1px solid rgba(31,31,31,0.06);
  scroll-margin-top: 80px;
  transition: box-shadow 0.25s ease;
}

.page-content-inner section:hover {
  box-shadow: 0 6px 28px rgba(31,31,31,0.09);
}

.page-content-inner h2 {
  font-family: 'Caveat', cursive;
  font-size: 1.9rem;
  font-weight: 700;
  color: #1f1f1f;
  margin-bottom: 0.5rem;
}

.page-content-inner h2 + hr {
  margin-bottom: 1.2rem;
}

.page-content-inner h3 {
  font-family: 'Caveat', cursive;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1f1f1f;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.page-content-inner p {
  color: rgba(31,31,31,0.82);
  font-size: 1rem;
  line-height: 1.8;
}

.page-content-inner ul,
.page-content-inner ol {
  color: rgba(31,31,31,0.82);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1em;
}

.page-content-inner strong {
  color: #1f1f1f;
  font-weight: 600;
}

.page-content-inner a {
  color: #1f1f1f;
  text-decoration: underline;
  text-decoration-color: rgba(31,31,31,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.page-content-inner a:hover {
  text-decoration-color: #1f1f1f;
  opacity: 1;
}

.page-content-inner blockquote {
  border-left: 3px solid #1f1f1f;
  padding-left: 1.2rem;
  margin: 1.2rem 0;
  color: rgba(31,31,31,0.65);
  font-style: italic;
}

.page-content-inner img {
  border-radius: 12px;
  margin: 1rem 0;
}

.page-content-inner table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0;
}

.page-content-inner th,
.page-content-inner td {
  padding: 0.65rem 1rem;
  border: 1px solid rgba(31,31,31,0.1);
  text-align: left;
}

.page-content-inner th {
  background: #f5f5f5;
  font-weight: 600;
}

/* ── Footer ── */
.site-footer {
  background: #1f1f1f;
  color: rgba(255,255,255,0.85);
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-address {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-style: normal;
}

.footer-brand-name {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.footer-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

.footer-contact {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem 1rem;
}

.footer-nav-list li {
  margin: 0;
}

.footer-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0;
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.18s;
  text-decoration: none;
}

.footer-link:hover {
  color: #ffffff;
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.2rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  margin: 0;
}

/* ── Parallax / Motion ── */
@media (prefers-reduced-motion: no-preference) {
  .hero-section {
    will-change: transform;
  }

  .bento-card {
    will-change: transform;
  }

  .page-content-inner section {
    animation: fadeSlideUp 0.5s ease both;
  }

  .page-content-inner section:nth-child(1) { animation-delay: 0.05s; }
  .page-content-inner section:nth-child(2) { animation-delay: 0.10s; }
  .page-content-inner section:nth-child(3) { animation-delay: 0.15s; }
  .page-content-inner section:nth-child(4) { animation-delay: 0.20s; }
  .page-content-inner section:nth-child(5) { animation-delay: 0.25s; }
  .page-content-inner section:nth-child(6) { animation-delay: 0.30s; }
  .page-content-inner section:nth-child(7) { animation-delay: 0.35s; }

  @keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

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

/* ── Responsive ── */
@media (max-width: 1024px) {
  .bento-grid-intro {
    grid-template-columns: repeat(3, 1fr);
  }
  .bento-card-wide {
    grid-column: span 2;
  }
  .sidebar-aside {
    display: none;
  }
  .main-article {
    display: block;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 60px;
  }

  .site-main {
    padding: 1rem 1rem 2rem;
  }

  .header-brand-row {
    padding: 0.6rem 1rem;
  }

  .site-nav {
    padding: 0 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }

  .nav-links-row {
    flex-wrap: nowrap;
    min-width: max-content;
  }

  .nav-link {
    padding: 0.7rem 0.7rem;
    font-size: 0.82rem;
  }

  .bento-grid-intro {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .bento-card-wide,
  .bento-card-tall {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 140px;
  }

  .hero-section {
    padding: 2rem 1.25rem;
    min-height: unset;
    border-radius: 16px;
  }

  .hero-inner {
    gap: 1rem;
  }

  .hero-emoji {
    font-size: 2.5rem;
  }

  .page-content-inner section {
    padding: 1.5rem 1.1rem;
    border-radius: 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-nav-list {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    padding: 2rem 1rem 1.2rem;
  }
}

@media (max-width: 480px) {
  .brand-tagline { display: none; }
  .nav-link { padding: 0.65rem 0.55rem; font-size: 0.78rem; }
  .hero-h1 { font-size: 1.75rem; }
  .footer-nav-list { grid-template-columns: 1fr; }
}
