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

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #f2f2f4;
  --surface:   #ffffff;
  --surface-2: #eaeaec;
  --border:    #dcdce0;
  --border-2:  #c8c8ce;
  --orange:    #e07b00;
  --orange-dim:#fff0dc;
  --white:     #111118;
  --muted:     #b0b0b8;
  --muted-2:   #737380;
  --green:     #16a34a;
  --red:       #dc2626;
  --mono:      'JetBrains Mono', monospace;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--orange);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ── Nav ── */
nav {
  background: rgba(242, 242, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  list-style: none;
  display: flex;
  height: 100%;
}

nav ul li a {
  display: flex;
  align-items: center;
  padding: 0 1.1rem;
  height: 100%;
  color: var(--muted-2);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.15s;
  border-right: 1px solid var(--border);
}

nav ul li:first-child a { border-left: 1px solid var(--border); }

nav ul li a:hover {
  color: var(--white);
  text-decoration: none;
}

/* Price badge */
.price-badge {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted-2);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
}
.price-badge .price-value { color: var(--white); font-weight: 600; }
.price-badge .price-change.up   { color: var(--green); }
.price-badge .price-change.down { color: var(--red); }

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding: 5rem 2rem 4rem;
  max-width: 100%;
}

/* Dot grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border-2) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.5;
  pointer-events: none;
}

/* Glow */
.hero::after {
  content: '';
  position: absolute;
  top: -80px;
  left: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,140,0,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  background: var(--orange-dim);
  border: 1px solid rgba(224,123,0,0.25);
  padding: 0.3rem 0.75rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--white);
}

.hero h1 .accent { color: var(--orange); }

.hero p {
  font-size: 1rem;
  color: var(--muted-2);
  max-width: 440px;
  margin-bottom: 2.25rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Portfolio bar ── */
.portfolio-bar {
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
}

.portfolio-stat {
  padding: 1.5rem 2rem;
  border-right: 1px solid var(--border);
}

.portfolio-stat:last-child { border-right: none; }

.portfolio-stat .stat-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted-2);
  margin-bottom: 0.5rem;
}

.portfolio-stat .stat-value {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
}

/* ── Chart ── */
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-wrap canvas { display: none; }

.chart-empty {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.section-link {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--orange);
  float: right;
  letter-spacing: 0.5px;
}

.table-empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 2rem !important;
}

/* ── Stats bar ── */
.stats-bar {
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 100%;
}

.stat {
  padding: 1.5rem 2rem;
  border-right: 1px solid var(--border);
  position: relative;
}

.stat:last-child { border-right: none; }

.stat-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted-2);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.5px;
}

.stat-value.accent { color: var(--orange); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--orange);
  color: #000;
  padding: 0.6rem 1.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.15s;
}

.btn:hover {
  background: #e07b00;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--muted-2);
  border: 1px solid var(--border-2);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--white);
  border-color: var(--border-2);
}

/* ── Layout ── */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

h1 {
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -1px;
  margin-bottom: 0.25rem;
}

h1 .accent { color: var(--orange); }

h2 {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted-2);
  margin: 3rem 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
}

p {
  color: var(--muted-2);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.page-subtitle {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 2.5rem;
}

/* ── Cards ── */
.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border: 1px solid var(--border);
}

.card {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
  transition: background 0.15s;
}

.card:last-child { border-right: none; }
.card:hover { background: var(--surface); }

.card-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--orange);
  margin-bottom: 0.6rem;
}

.card h3 {
  font-size: 0.85rem;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.82rem;
  color: var(--muted-2);
  margin: 0;
  line-height: 1.6;
}

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  border: 1px solid var(--border);
}

th {
  background: var(--surface);
  color: var(--muted-2);
  text-align: left;
  padding: 0.65rem 1rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 0.82rem;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface); }

tfoot td {
  font-weight: 600;
  color: var(--white);
  border-top: 1px solid var(--border-2);
  background: var(--surface-2);
}

/* ── Posts ── */
.post {
  border: 1px solid var(--border);
  border-left: 2px solid var(--orange);
  padding: 1.5rem;
  margin: 1.25rem 0;
  background: var(--surface);
  transition: border-color 0.15s;
}

.post:hover { border-color: var(--border-2); border-left-color: var(--orange); }

.post-meta {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.6rem;
}

.post h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.post p  { font-size: 0.875rem; }

/* ── Video ── */
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1.25rem 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  nav {
    padding: 0 1rem;
    height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  nav ul {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  nav ul li a {
    padding: 0 0.75rem;
    height: 44px;
    line-height: 44px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .price-badge {
    display: none;
  }

  .hero {
    padding: 2.5rem 1.25rem 2rem;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .stats-bar,
  .portfolio-bar {
    grid-template-columns: 1fr 1fr;
  }

  .stat,
  .portfolio-stat {
    padding: 1rem 1.25rem;
  }

  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(n+3),
  .portfolio-stat:nth-child(n+3) {
    border-top: 1px solid var(--border);
  }

  .portfolio-stat:nth-child(2n) { border-right: none; }

  .stat-value,
  .portfolio-stat .stat-value {
    font-size: 1.1rem;
  }

  .card-row {
    grid-template-columns: 1fr;
  }

  .card {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .card:last-child { border-bottom: none; }

  .page-wrap {
    padding: 2rem 1.25rem;
  }

  table {
    font-size: 0.78rem;
  }

  th, td {
    padding: 0.5rem 0.6rem;
  }

  .chart-wrap {
    padding: 1rem;
    min-height: 220px;
  }

  footer {
    flex-direction: column;
    gap: 0.25rem;
    text-align: center;
    margin-top: 3rem;
  }
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
