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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f0f1f3;
  --text-primary: #111111;
  --text-secondary: #444444;
  --text-muted: #888888;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --accent: #111111;
  --grid-color: rgba(0, 0, 0, 0.06);
  --grid-color-strong: rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --card-bg: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --text-primary: #f0f0f0;
  --text-secondary: #cccccc;
  --text-muted: #777777;
  --border: #2a2a2a;
  --border-light: #1f1f1f;
  --accent: #f0f0f0;
  --grid-color: rgba(255, 255, 255, 0.04);
  --grid-color-strong: rgba(255, 255, 255, 0.06);
  --nav-bg: rgba(10, 10, 10, 0.85);
  --card-bg: #141414;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  background-position: -1px -1px, -1px -1px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

ul {
  list-style: none;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-logo span {
  font-weight: 300;
  color: var(--text-muted);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-primary);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Nav Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.control-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.lang-toggle .lang-label {
  font-size: 0.7rem;
  letter-spacing: 0.5px;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.icon-sun { display: block; }
.icon-moon { display: none; }

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ===== Hero Section ===== */
.hero {
  padding: 160px 2rem 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--grid-color-strong) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .avatar {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.avatar:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

/* Hero Title - Artistic Design */
.hero-name {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 0.75rem;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4em;
}

.hero-name-main {
  font-family: 'Playfair Display', 'Inter', serif;
  font-weight: 700;
  letter-spacing: -2px;
}

.hero-name-accent {
  font-weight: 300;
  font-size: 0.55em;
  color: var(--text-muted);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.hero-tagline {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.hero-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* ===== Stats Bar ===== */
.stats-bar {
  padding: 0 2rem;
  margin-bottom: 4rem;
}

.stats-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.5rem 2rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ===== Cards Section ===== */
.cards-section {
  padding: 0 2rem 6rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-wide {
  grid-column: 1 / -1;
}

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  color: var(--text-primary);
}

.card-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  letter-spacing: -0.3px;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Card List */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.card-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-light);
}

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

.list-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.list-code {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.list-sponsor {
  font-size: 0.7rem;
  color: var(--text-muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.card-link svg {
  width: 14px;
  height: 14px;
  transition: var(--transition);
}

.card-link:hover {
  color: var(--text-primary);
}

.card-link:hover svg {
  transform: translateX(4px);
}

/* Market Grid */
.market-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.market-item {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.market-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.market-value {
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}

.market-value.positive {
  color: var(--text-primary);
}

.market-value.negative {
  color: var(--text-muted);
}

.market-value small {
  font-size: 0.75rem;
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-primary);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.footer-logo span {
  font-weight: 300;
  color: var(--text-muted);
}

.footer-brand p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

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

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .market-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 120px 1.5rem 60px;
  }

  .hero-name {
    font-size: 2.25rem;
    flex-direction: column;
    gap: 0.1em;
    align-items: center;
  }

  .hero-name-accent {
    font-size: 0.45em;
  }

  .nav-inner {
    padding: 0 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .nav-controls {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }

  .stats-inner {
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .cards-section {
    padding: 0 1.5rem 4rem;
  }

  .card {
    padding: 1.5rem;
  }

  .market-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}
