:root {
  --bg: #0c1014;
  --ink: #f3f1ea;
  --muted: #b7c0c8;
  --line: rgba(243, 241, 234, 0.16);
  --gold: #e2c27a;
  --stone: #9aa7b2;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", Consolas, ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; }
body > * { position: relative; z-index: 1; }
::selection { background: var(--gold); color: #1a1408; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
code { font-family: var(--mono); }

.skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--gold); color: #1a1408; padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 12px; }
.beam { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; transform: scaleX(0); transform-origin: left center; background: var(--gold); pointer-events: none; }
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.sky img { width: 130%; height: 130%; margin: -8% 0 0 -12%; object-fit: cover; filter: blur(22px) saturate(0.7) brightness(0.38); animation: drift 32s ease-in-out infinite; }
.sky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,16,20,0.2), rgba(12,16,20,0.86)); }
@keyframes drift { 50% { transform: scale(1.08) translate3d(1%, -1%, 0); } }

.wrap { width: min(1100px, calc(100% - 48px)); margin-inline: auto; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5.4vw, 72px); letter-spacing: -0.03em; line-height: 0.96; }

.header { position: sticky; top: 0; z-index: 30; background: rgba(12,16,20,0.75); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; }
.header.is-stuck { border-bottom-color: var(--line); }
.header-bar { display: flex; align-items: center; gap: 22px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.03em; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--gold); }
.brand-tick { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--gold); }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.menu-btn { display: none; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; }
.copy-ca, .ghost { border-radius: 999px; transition: transform 0.25s var(--ease), background 0.25s var(--ease); }
.copy-ca { height: 40px; padding: 0 16px; background: var(--ink); color: #14181c; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.header .copy-ca { margin-left: auto; }
.copy-ca:hover { background: var(--gold); transform: translateY(-1px); }
.copy-ca-lg { height: 52px; padding: 0 22px; font-size: 16px; }
.ghost { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ghost:hover { color: var(--gold); }

.hero { padding: 42px 0 18px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.8fr); gap: 28px; align-items: center; }
.hero h1 { display: flex; flex-direction: column; font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 5.8vw, 80px); letter-spacing: -0.035em; line-height: 0.94; }
.hero h1 span { animation: rise 0.85s var(--ease) both; }
.hero h1 span:nth-child(2) { animation-delay: 0.1s; }
.glow { font-style: italic; color: var(--gold); }
.lede { max-width: 42ch; margin-top: 18px; color: var(--muted); font-size: 18px; animation: rise 0.85s 0.2s var(--ease) both; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-top: 26px; animation: rise 0.85s 0.28s var(--ease) both; }
.text-link { text-decoration: none; border-bottom: 1px solid rgba(243,241,234,0.4); padding-bottom: 2px; font-weight: 600; }
.text-link:hover { border-bottom-color: var(--gold); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.portrait { width: min(100%, 420px); margin-left: auto; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,0.4); animation: float 7s ease-in-out infinite; }
.portrait img { width: 100%; height: auto; object-fit: cover; }
@keyframes float { 50% { transform: translateY(-10px); } }

.contract { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.contract .kicker { margin: 0; }
.contract code { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 14px 0; margin-top: 12px; }
.marquee-track { display: flex; width: max-content; animation: ticker 26s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; }
.marquee-group span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; color: var(--muted); }
.marquee-group i { width: 6px; height: 6px; margin: 0 20px; border-radius: 50%; background: var(--gold); flex: none; }
@keyframes ticker { to { transform: translateX(-50%); } }

.block { padding: 88px 0; }
.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.lane { padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: rgba(12,16,20,0.45); min-height: 240px; }
.lane span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lane strong { display: block; margin-top: 16px; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.04em; line-height: 0.9; }
.lane em { display: block; margin-top: 6px; font-style: normal; color: var(--gold); font-weight: 600; }
.lane p { margin-top: 14px; color: var(--muted); }
.lane-old { opacity: 0.72; }
.lane-new { border-color: rgba(226, 194, 122, 0.55); box-shadow: 0 0 40px rgba(226, 194, 122, 0.12); animation: glow 3.5s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 56px rgba(226, 194, 122, 0.22); } }

.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.posts a { display: flex; flex-direction: column; gap: 8px; min-height: 220px; padding: 18px; text-decoration: none; border: 1px solid var(--line); border-radius: 18px; background: rgba(12,16,20,0.5); transition: transform 0.3s var(--ease); }
.posts a:hover { transform: translateY(-4px); }
.posts span { font-family: var(--mono); font-size: 12px; color: var(--gold); }
.posts strong { font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: -0.03em; line-height: 1; }
.posts p { color: var(--muted); }

.chart-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.chart-links { display: flex; gap: 16px; padding-bottom: 8px; }
.chart-links a { font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(243,241,234,0.35); padding-bottom: 2px; }
.chart-links a:hover { border-bottom-color: var(--gold); }
.chart-frame { height: min(70vh, 640px); min-height: 460px; border-radius: 22px; overflow: hidden; background: #0c1014; border: 1px solid var(--line); }
.chart-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.chart-note { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }

.dev-panel { max-width: 720px; }
.dev-link { display: inline-flex; flex-direction: column; gap: 4px; margin-top: 24px; padding: 18px 22px 16px; text-decoration: none; border: 1px solid var(--line); border-radius: 18px; background: rgba(12,16,20,0.5); transition: transform 0.25s var(--ease); }
.dev-link:hover { transform: translateY(-3px); }
.dev-link span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.dev-link strong { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 0.9; color: var(--gold); }

.footer { padding: 8px 0 36px; border-top: 1px solid var(--line); }
.footer-name { font-family: var(--serif); font-style: italic; font-size: clamp(56px, 9vw, 108px); line-height: 0.9; margin: 16px 0; }
.footer-row { display: flex; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.footer-row nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--gold); }
.footer code { color: var(--muted); font-size: 12px; }

@media (max-width: 860px) {
  .hero-grid, .lanes, .posts { grid-template-columns: 1fr; }
  .portrait { width: min(100%, 320px); margin: 8px auto 0; order: -1; }
  .block { padding: 68px 0; }
  .chart-frame { min-height: 520px; height: 70vh; }
}
@media (max-width: 800px) {
  .menu-btn { display: inline-flex; align-items: center; margin-left: auto; flex-shrink: 0; }
  .brand-name { display: none; }
  .header-bar { gap: 10px; }
  .header .copy-ca { margin-left: 10px; height: 36px; padding: 0 12px; font-size: 13px; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: flex-start; padding: 12px 22px 22px; background: #0c1014; border-bottom: 1px solid var(--line); }
  .header.is-open .nav-links { display: flex; min-height: calc(100dvh - 72px); }
  .nav-links a { font-size: 24px; color: var(--ink); padding: 8px 0; }
}
@media (max-width: 560px) {
  .wrap { width: min(1100px, calc(100% - 32px)); }
  .contract { grid-template-columns: auto 1fr; }
  .contract code { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .marquee-track { transform: none; }
  .marquee-group:last-child { display: none; }
}
