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

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

:root {
  --bg: #0D1117;
  --accent: #00FFAA;
  --warm: #FF6B35;
  --bg2: #161B22;
  --bg3: #1C2333;
  --text: #E6EDF3;
  --text-muted: #8B949E;
  --border: #30363D;
  --nav-h: 64px;
  --radius: 28px;
  --font-mono: 'Fira Code', 'Courier New', monospace;
  --font-sans: 'Fira Sans', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
}

body, .dark-body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

section[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

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

ul {
  list-style: none;
}

/* ===== LAYOUT ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding-bottom: calc(var(--nav-h) + 24px);
}

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

/* ===== BOTTOM NAV (aside > nav > ul > li > a) ===== */
.side-nav-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.96);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.bottom-nav {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  gap: 8px;
}

.nav-brand {
  flex-shrink: 0;
  margin-right: 8px;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
}

.brand-icon:hover {
  background: rgba(0, 255, 170, 0.12);
}

.logo-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.logo-text-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: -0.04em;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-list > li {
  flex-shrink: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 255, 170, 0.08);
}

.nav-contact {
  flex-shrink: 0;
  margin-left: 8px;
}

.nav-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--warm);
  border-radius: 8px;
  color: var(--warm);
  font-size: 1rem;
  transition: all 0.2s;
}

.nav-contact-btn:hover {
  background: rgba(255, 107, 53, 0.15);
  color: var(--warm);
}

/* ===== HERO (main > article.wrap > section > div) ===== */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(0,255,170,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(255,107,53,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero-article {
  width: 100%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow-line {
  display: block;
  width: 32px;
  height: 1.5px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 420px;
}

.hero-type-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  overflow: hidden;
  white-space: nowrap;
}

.type-prefix {
  color: var(--warm);
  margin-right: 4px;
}

.type-cursor {
  color: var(--accent);
  font-weight: 600;
}

.type-blink {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  transition: all 0.25s;
  align-self: flex-start;
}

.hero-cta:hover {
  background: transparent;
  color: var(--accent);
}

/* Hero Visual */
.hero-visual-col {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.hero-bg-text {
  position: absolute;
  font-family: var(--font-mono);
  font-size: clamp(5rem, 12vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 255, 170, 0.12);
  user-select: none;
  pointer-events: none;
  animation: drift 8s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.hash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  position: relative;
  z-index: 1;
}

.hg-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
}

.hg-item:nth-child(1) { animation-delay: 0.1s; }
.hg-item:nth-child(2) { animation-delay: 0.2s; }
.hg-item:nth-child(3) { animation-delay: 0.3s; }
.hg-item:nth-child(4) { animation-delay: 0.4s; }
.hg-item:nth-child(5) { animation-delay: 0.5s; }
.hg-item:nth-child(6) { animation-delay: 0.6s; }
.hg-item:nth-child(7) { animation-delay: 0.7s; }
.hg-item:nth-child(8) { animation-delay: 0.8s; }

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

/* ===== CONTENT SECTION ===== */
.content-section {
  padding: 40px 0;
}

.content-article {
  width: 100%;
}

.page-content {
  width: 100%;
}

/* Content inner sections from page.content */
.page-content section {
  padding: 72px 0 56px;
  border-top: 1px solid var(--border);
  position: relative;
}

.page-content section:first-child {
  border-top: none;
}

.page-content h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 32px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.page-content h2 > span {
  display: inline;
}

.page-content h3 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  margin: 32px 0 16px;
}

.page-content h3 > span {
  display: inline;
}

.page-content p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 680px;
}

.page-content ul,
.page-content ol {
  padding-left: 0;
  margin-bottom: 24px;
}

.page-content ul > li,
.page-content ol > li {
  position: relative;
  padding: 10px 16px 10px 36px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.page-content ul > li::before {
  content: '›';
  position: absolute;
  left: 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
}

.page-content ol {
  counter-reset: item;
}

.page-content ol > li {
  counter-increment: item;
}

.page-content ol > li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--warm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.page-content strong {
  color: var(--text);
  font-weight: 600;
}

.page-content em {
  color: var(--warm);
  font-style: normal;
}

.page-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--accent);
}

.page-content pre {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 24px;
  color: var(--accent);
}

.page-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(0, 255, 170, 0.04);
  border-radius: 0 8px 8px 0;
}

.page-content blockquote p {
  margin: 0;
  color: var(--text);
}

.page-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(0, 255, 170, 0.3);
  transition: border-color 0.2s;
}

.page-content a:hover {
  border-color: var(--accent);
  color: var(--warm);
}

/* Scroll reveal */
.page-content section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.page-content section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  margin-bottom: var(--nav-h);
}

.footer-cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 72px 24px 56px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.footer-cta-title {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.footer-cta-title > span {
  display: inline;
}

.footer-cta-accent {
  color: var(--accent);
  margin-left: 16px;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 36px;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  transition: all 0.25s;
}

.footer-cta-btn:hover {
  background: transparent;
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
}

.footer-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-style: normal;
  font-size: 0.9rem;
}

.footer-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
}

.footer-email {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.footer-email:hover {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links > li > a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 4px;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.footer-links > li > a:hover {
  color: var(--accent);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual-col {
    display: none;
  }

  .hero-section {
    min-height: auto;
    padding: 48px 0 40px;
  }

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

  .nav-link {
    font-size: 0.72rem;
    padding: 0 8px;
  }

  .footer-cta-title {
    font-size: 1.5rem;
  }

  .page-content h2 {
    font-size: 1.25rem;
  }

  .wrap {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .nav-list {
    gap: 0;
  }

  .nav-link {
    font-size: 0.68rem;
    padding: 0 6px;
    height: 40px;
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .page-content section {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

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