@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital@1&display=swap');

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  color-scheme: dark;
  font-size: 16px;
}

body.oled-dark {
  background: #000000;
  color: #E0E0E0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scroll margin for fixed bottom nav */
article[id] {
  scroll-margin-top: 24px;
  scroll-margin-bottom: 72px;
}

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

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

/* ===========================
   SITE WRAPPER
   =========================== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 64px; /* room for fixed bottom bar */
}

/* ===========================
   BOTTOM FIXED NAV BAR
   =========================== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: #121212;
  border-top: 1px solid #222222;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  gap: 12px;
}

.bottom-nav {
  flex: 1;
  overflow: hidden;
}

.bottom-nav-links {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.bottom-nav-links::-webkit-scrollbar {
  display: none;
}

.bottom-nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 56px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #999;
  transition: color 0.2s;
  white-space: nowrap;
  min-width: 40px;
}

.bottom-nav-links a:hover,
.bottom-nav-links a:focus {
  color: #FFFFFF;
  outline: none;
}

.bottom-nav-links a:focus-visible {
  outline: 2px solid #7B61FF;
  outline-offset: -2px;
}

/* Logo corner */
.logo-corner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(0.9);
}

.logo-text-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #7B61FF;
  color: #000;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 6px;
  letter-spacing: -0.02em;
}

/* Hamburger button */
.hamburger-btn {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid #333;
  border-radius: 8px;
  cursor: pointer;
  padding: 10px 8px;
  transition: border-color 0.2s;
}

.hamburger-btn:hover {
  border-color: #7B61FF;
}

.hamburger-btn:focus-visible {
  outline: 2px solid #7B61FF;
  outline-offset: 2px;
}

.ham-line {
  display: block;
  width: 20px;
  height: 2px;
  background: #E0E0E0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger-btn[aria-expanded="true"] .ham-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn[aria-expanded="true"] .ham-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn[aria-expanded="true"] .ham-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
   FULLSCREEN MENU
   =========================== */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 950;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.fullscreen-menu {
  position: fixed;
  inset: 0;
  z-index: 960;
  background: #000000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 40px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.77,0,0.175,1);
  overflow-y: auto;
}

.fullscreen-menu.is-open {
  transform: translateX(0);
}

.menu-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 1px solid #333;
  color: #E0E0E0;
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}

.menu-close:hover {
  border-color: #7B61FF;
  color: #7B61FF;
}

.menu-close:focus-visible {
  outline: 2px solid #7B61FF;
  outline-offset: 2px;
}

.menu-nav {
  width: 100%;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-link {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 400;
  color: #555;
  padding: 12px 0;
  border-bottom: 1px solid #1a1a1a;
  transition: color 0.25s, padding-left 0.25s;
  min-height: 40px;
  opacity: 0;
  transform: translateX(40px);
}

.fullscreen-menu.is-open .menu-link {
  animation: slideInLink 0.5s cubic-bezier(0.23,1,0.32,1) forwards;
  animation-delay: calc(var(--i) * 0.06s + 0.15s);
}

@keyframes slideInLink {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.menu-link:hover,
.menu-link:focus {
  color: #FFFFFF;
  padding-left: 16px;
  outline: none;
  text-shadow: 0 0 20px rgba(123,97,255,0.6);
}

.menu-link:focus-visible {
  outline: 2px solid #7B61FF;
  outline-offset: 2px;
}

/* ===========================
   HERO
   =========================== */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #000000;
  overflow: hidden;
  padding: 80px 24px 60px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: #7B61FF;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  text-shadow: 0 0 60px rgba(123,97,255,0.15);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #888;
  max-width: 520px;
  line-height: 1.7;
}

/* Diagonal slash divider */
.hero-slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: #000000;
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 3;
}

/* Decorative background element */
.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(123,97,255,0.06) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
}

/* ===========================
   MAIN CONTENT
   main > div.wrap > article > section
   =========================== */
.main-content {
  flex: 1;
  background: #000000;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.content-section {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  align-items: start;
}

.content-article {
  min-width: 0;
}

.content-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #CCCCCC;
}

/* Content body elements */
.content-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  color: #FFFFFF;
  line-height: 1.2;
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1e1e1e;
}

.content-body h2:first-child {
  margin-top: 0;
}

.content-body h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #E0E0E0;
  margin: 2rem 0 0.875rem;
  letter-spacing: -0.01em;
}

.content-body p {
  margin-bottom: 1.25rem;
  color: #BBBBBB;
}

.content-body ul,
.content-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: #BBBBBB;
}

.content-body li {
  margin-bottom: 0.5rem;
}

.content-body strong {
  color: #FFFFFF;
  font-weight: 600;
}

.content-body em {
  color: #9B85FF;
  font-style: italic;
}

.content-body a {
  color: #7B61FF;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.content-body a:hover {
  color: #A08BFF;
}

/* Section blocks within content */
.content-body article {
  margin-bottom: 3rem;
  padding: 2rem;
  border: 1px solid #1e1e1e;
  border-radius: 28px;
  background: #0a0a0a;
  transition: border-color 0.3s;
}

.content-body article:hover {
  border-color: #333;
}

.content-body article:first-child {
  border-color: #2a2040;
}

/* ===========================
   ASIDE
   =========================== */
.content-aside {
  position: sticky;
  top: 24px;
  background: #0a0a0a;
  border: 1px solid #1e1e1e;
  border-radius: 28px;
  padding: 28px 24px;
}

.aside-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #555;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.aside-title span {
  display: inline-block;
}

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

.aside-link {
  display: block;
  padding: 10px 12px;
  font-size: 0.875rem;
  color: #777;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-link:hover,
.aside-link:focus {
  background: #151515;
  color: #E0E0E0;
  outline: none;
}

.aside-link:focus-visible {
  outline: 2px solid #7B61FF;
  outline-offset: 1px;
}

/* ===========================
   FOOTER
   footer 只放 p 与 small
   =========================== */
.site-footer {
  background: #000000;
  border-top: 1px solid #111111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.8rem;
  color: #444;
}

.footer-note {
  font-size: 0.75rem;
  color: #333;
  text-align: right;
}

/* ===========================
   STAGGER ANIMATION
   =========================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-item {
  opacity: 0;
}

/* ===========================
   HOVER MICRO-INTERACTIONS
   =========================== */
.content-body article {
  transition: border-color 0.3s, transform 0.2s;
  will-change: transform;
}

.content-body article:hover {
  transform: translateY(-2px);
}

/* ===========================
   RESPONSIVE — TABLET
   =========================== */
@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    display: none; /* hidden on mobile, shown via bottom nav */
  }

  .bottom-nav-links a {
    font-size: 0.75rem;
    padding: 0 8px;
  }
}

/* ===========================
   RESPONSIVE — MOBILE 375px
   =========================== */
@media (max-width: 480px) {
  .hero-section {
    min-height: 70vh;
    padding: 60px 20px 40px;
  }

  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .wrap {
    padding: 40px 16px 60px;
  }

  .content-body article {
    padding: 1.25rem;
    border-radius: 20px;
  }

  .fullscreen-menu {
    padding: 48px 24px;
  }

  .menu-link {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer-note {
    text-align: left;
  }

  .bottom-nav-links a {
    font-size: 0.72rem;
    padding: 0 6px;
    height: 56px;
  }

  .hamburger-btn,
  .logo-corner {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ===========================
   PREFERS REDUCED MOTION
   =========================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fullscreen-menu,
  .menu-backdrop,
  .menu-link,
  .ham-line,
  .content-body article,
  .aside-link,
  .menu-close,
  .hamburger-btn {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }

  .stagger-item {
    opacity: 1;
  }

  .menu-link {
    opacity: 1;
    transform: none;
  }
}

/* ===========================
   FOCUS VISIBLE GLOBAL
   =========================== */
:focus-visible {
  outline: 2px solid #7B61FF;
  outline-offset: 3px;
}

button[aria-expanded]{min-width:44px;min-height:44px}
