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

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

:root {
  --green: #87ff71;
  --yellow: #ffce5c;
  --dark: #192617;
  --dark2: #1e3019;
  --dark3: #0f1a0e;
  --light: #f5fff2;
  --mid: #2d4228;
  --accent-red: #ff4e4e;
  --radius-card: 18px;
  --nav-w: 230px;
  --font-head: 'Cormorant', Georgia, serif;
  --font-body: 'Montserrat', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  scroll-behavior: smooth;
}

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--light);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: var(--yellow);
}

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

ul, menu {
  list-style: none;
}

/* =============================================
   Layout: Site Wrapper
   ============================================= */
.site-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  width: 100%;
  overflow-x: hidden;
}

/* =============================================
   Left Fixed Navigation
   ============================================= */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--dark3);
  border-right: 3px solid var(--green);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-y: auto;
}

.side-nav summary {
  list-style: none;
}
.side-nav summary::-webkit-details-marker {
  display: none;
}

.side-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 16px;
  background: var(--dark2);
  border-bottom: 2px dashed var(--green);
  cursor: default;
}

.nav-logo {
  border-radius: 50%;
  border: 2px solid var(--yellow);
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--green);
  letter-spacing: 0.04em;
  line-height: 1.3;
  word-break: break-all;
}

.nav-menu {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-pill {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid var(--green);
  color: var(--light);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  min-height: 40px;
}

.nav-pill:hover {
  background: var(--green);
  color: var(--dark);
  transform: translateX(4px);
}

.nav-slogan {
  padding: 14px 20px;
  font-size: 0.72rem;
  color: var(--yellow);
  letter-spacing: 0.08em;
  border-top: 1px dotted var(--mid);
  text-align: center;
}

/* =============================================
   Main Column
   ============================================= */
.main-col {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: calc(100% - var(--nav-w));
  overflow-x: hidden;
}

/* =============================================
   Hero
   ============================================= */
.hero {
  position: relative;
  min-height: 45vh;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 18px,
      rgba(135,255,113,0.06) 18px,
      rgba(135,255,113,0.06) 20px
    ),
    linear-gradient(135deg, var(--dark2) 0%, var(--dark3) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  width: 100%;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  padding: 48px 48px 80px 48px;
  gap: 40px;
  min-width: 0;
}

.hero-media {
  flex-shrink: 0;
  max-width: 240px;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 3px solid var(--yellow);
  transform: rotate(-2deg);
  box-shadow: 8px 8px 0 var(--green);
}

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

.hero-copy {
  text-align: right;
  max-width: 480px;
  min-width: 0;
  flex: 1;
}

.hero-h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 3rem);
  color: var(--green);
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 3px 3px 0 var(--dark3);
  word-break: break-all;
  overflow-wrap: break-word;
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--yellow);
  font-weight: 400;
  max-width: 380px;
  margin-left: auto;
  line-height: 1.6;
  word-break: break-all;
  overflow-wrap: break-word;
}

.hero-shape-tri {
  position: absolute;
  top: -30px;
  left: -30px;
  width: 120px;
  height: 120px;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  opacity: 0.55;
  transform: rotate(10deg);
  z-index: 1;
}

.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 52px;
  background: var(--dark);
  clip-path: polygon(0 60%, 4% 30%, 8% 60%, 12% 20%, 16% 55%, 20% 10%, 25% 50%, 30% 0%, 35% 45%, 40% 5%, 45% 50%, 50% 15%, 55% 55%, 60% 0%, 65% 50%, 70% 10%, 75% 55%, 80% 5%, 85% 45%, 90% 10%, 95% 50%, 100% 20%, 100% 100%, 0 100%);
  z-index: 3;
}

/* =============================================
   Content Area
   ============================================= */
.content-area {
  display: flex;
  gap: 28px;
  padding: 40px 36px 48px 40px;
  flex: 1;
  align-items: flex-start;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.wrap {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  max-width: 100%;
}

.content-section {
  width: 100%;
}

.content-article {
  width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* =============================================
   Page Content (injected HTML)
   ============================================= */
.content-article h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  color: var(--green);
  margin-top: 2.4rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
  overflow-wrap: break-word;
  word-break: break-all;
}

.content-article h2 + hr {
  border: none;
  border-top: 2px solid var(--green);
  margin-bottom: 1.2rem;
  opacity: 0.5;
}

.content-article h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--yellow);
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
  word-break: break-all;
}

.content-article h3 + hr {
  border: none;
  border-top: 1px dashed var(--yellow);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.content-article p {
  font-size: 1rem;
  line-height: 1.75;
  color: #d0f0c8;
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.content-article ul,
.content-article ol {
  padding-left: 1.4em;
  margin-bottom: 1rem;
}

.content-article li {
  font-size: 1rem;
  line-height: 1.7;
  color: #d0f0c8;
  margin-bottom: 0.4rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.content-article a {
  color: var(--yellow);
  border-bottom: 1px dotted var(--yellow);
  word-break: break-all;
}

.content-article a:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

.content-article strong {
  color: var(--green);
  font-weight: 600;
}

.content-article article {
  scroll-margin-top: 24px;
  padding: 24px 24px;
  margin-bottom: 28px;
  background: var(--dark2);
  border-radius: var(--radius-card);
  border-bottom: 4px solid var(--green);
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.content-article article::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 60px;
  height: 60px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  opacity: 0.18;
  pointer-events: none;
}

article[id] {
  scroll-margin-top: 24px;
}

/* =============================================
   Aside / Sidebar
   ============================================= */
.sidebar {
  width: 180px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  align-self: flex-start;
}

.sidebar-inner {
  background: var(--dark2);
  border-radius: var(--radius-card);
  border-left: 4px solid var(--yellow);
  padding: 20px 14px;
  position: relative;
  overflow: hidden;
}

.sidebar-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 8px;
  word-break: break-all;
}

.sidebar-inner > hr {
  border: none;
  border-top: 2px solid var(--yellow);
  margin-bottom: 14px;
  opacity: 0.4;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  padding: 8px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #c5e8c0;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  min-height: 40px;
  line-height: 1.3;
  word-break: break-all;
  overflow-wrap: break-word;
}

.sidebar-links a:hover {
  background: var(--green);
  color: var(--dark);
}

.sidebar-deco-circle {
  position: absolute;
  bottom: -24px;
  right: -24px;
  width: 70px;
  height: 70px;
  border: 8px solid var(--green);
  border-radius: 50%;
  opacity: 0.18;
  pointer-events: none;
}

.sidebar-deco-tri {
  position: absolute;
  top: -10px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 28px solid var(--yellow);
  opacity: 0.22;
  pointer-events: none;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 36px;
  background: var(--dark3);
  border-top: 2px solid var(--green);
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.footer-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--green);
  white-space: nowrap;
}

.footer-logo {
  object-fit: contain;
  max-width: 80px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  min-width: 0;
}

.footer-nav a {
  color: #a8d4a3;
  font-size: 0.75rem;
  padding: 6px 8px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-right: 1px dotted var(--mid);
  transition: color 0.15s;
  white-space: nowrap;
}

.footer-nav a:last-child {
  border-right: none;
}

.footer-nav a:hover {
  color: var(--yellow);
}

.footer-copy {
  font-size: 0.74rem;
  color: #6a9464;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

/* =============================================
   Scroll Reveal Animation
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
  .content-article article {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.52s ease, transform 0.52s ease;
  }

  .content-article article.revealed {
    opacity: 1;
    transform: translateY(0);
  }

  .content-article article:nth-child(2) { transition-delay: 0.08s; }
  .content-article article:nth-child(3) { transition-delay: 0.16s; }
  .content-article article:nth-child(4) { transition-delay: 0.24s; }
  .content-article article:nth-child(5) { transition-delay: 0.32s; }
  .content-article article:nth-child(6) { transition-delay: 0.40s; }
  .content-article article:nth-child(7) { transition-delay: 0.48s; }

  .sidebar-inner {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
  }
  .sidebar-inner.revealed {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =============================================
   Memphis Geometric Decorations
   ============================================= */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(135,255,113,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

.site-wrapper {
  position: relative;
  z-index: 1;
}

/* =============================================
   Responsive — Tablet
   ============================================= */
@media (max-width: 1024px) {
  :root {
    --nav-w: 180px;
  }

  .content-area {
    padding: 28px 18px 32px 22px;
    gap: 18px;
  }

  .hero-inner {
    padding: 32px 28px 72px 24px;
    gap: 20px;
  }

  .sidebar {
    width: 160px;
  }

  .hero-media {
    max-width: 180px;
  }
}

/* =============================================
   Responsive — Mobile
   ============================================= */
@media (max-width: 768px) {
  :root {
    --nav-w: 0px;
  }

  body {
    overflow-x: hidden;
  }

  .site-wrapper {
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
  }

  .side-nav {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 3px solid var(--green);
    flex-direction: column;
    overflow: visible;
  }

  .main-col {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .side-nav__brand {
    padding: 12px 14px;
  }

  .nav-menu {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 5px;
  }

  .nav-pill {
    font-size: 0.76rem;
    padding: 7px 10px;
    min-height: 40px;
  }

  .nav-slogan {
    display: none;
  }

  .hero {
    min-height: auto;
    width: 100%;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-end;
    padding: 20px 14px 52px;
    gap: 12px;
    width: 100%;
  }

  .hero-media {
    max-width: 140px;
    align-self: flex-end;
    flex-shrink: 0;
  }

  .hero-copy {
    max-width: 100%;
    width: 100%;
  }

  .hero-h1 {
    font-size: 1.4rem;
    word-break: break-all;
  }

  .hero-sub {
    font-size: 0.85rem;
    max-width: 100%;
  }

  .content-area {
    flex-direction: column;
    padding: 18px 12px;
    gap: 18px;
    width: 100%;
    overflow: hidden;
  }

  .wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .content-article {
    max-width: 100%;
    overflow: hidden;
  }

  .content-article article {
    padding: 16px 12px;
    margin-bottom: 18px;
    max-width: 100%;
  }

  .sidebar {
    width: 100%;
    position: static;
  }

  .sidebar-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .sidebar-links a {
    padding: 6px 10px;
    min-height: 40px;
    font-size: 0.78rem;
  }

  .site-footer {
    padding: 12px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .footer-nav {
    flex-wrap: wrap;
  }

  .footer-nav a {
    font-size: 0.73rem;
    padding: 5px 7px;
  }

  .footer-copy {
    max-width: 100%;
    font-size: 0.72rem;
  }

  .content-article h2 {
    font-size: 1.2rem;
  }

  .content-article h3 {
    font-size: 1.05rem;
  }

  .content-article p,
  .content-article li {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    padding: 6px 8px;
    gap: 4px;
  }

  .nav-pill {
    font-size: 0.72rem;
    padding: 6px 9px;
    min-height: 40px;
  }

  .hero-h1 {
    font-size: 1.2rem;
  }

  .hero-sub {
    font-size: 0.82rem;
  }

  .content-area {
    padding: 14px 10px;
  }

  .content-article article {
    padding: 14px 10px;
  }

  .hero-inner {
    padding: 16px 10px 48px;
  }

  .hero-media {
    max-width: 120px;
  }
}
