/* Index page styles */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background: var(--color-bg);
  transition: background 0.5s ease;
}
main {
  flex: 1;
  padding: var(--space-16) var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 10;
  pointer-events: none;
}
.intro {
  max-width: 600px;
  margin: 0 auto;
  background: transparent;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

/* Toggle */
.chaos-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer; padding: 0;
  margin-left: var(--space-2);
}
.toggle-track {
  width: 64px; height: 32px;
  background: rgba(0,0,0,0.1);
  border: 1px solid var(--color-border);
  border-radius: 999px; position: relative;
  transition: all 0.3s ease;
}
.toggle-thumb {
  width: 27px; height: 27px;
  background: var(--color-text-subtle);
  border-radius: 50%; position: absolute;
  top: 2px; left: 2px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.chaos-toggle:hover .toggle-track { background: rgba(0,0,0,0.15); border-color: var(--color-text-muted); }
.chaos-toggle:hover .toggle-thumb { background: var(--color-text); }

/* Chaos mode toggle */
body.chaos-mode .toggle-track { background: rgba(255,107,107,0.2); border-color: #ff6b6b; }
body.chaos-mode .toggle-thumb { background: #ff6b6b; transform: translateX(30px); }

/* Card mode in chaos */
body.chaos-mode .intro {
  position: fixed;
  top: 30px; right: var(--space-8);
  width: 320px; max-width: calc(100vw - var(--space-12));
  background: #0a0a0a;
  border: 1px solid #333;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  margin: 0; transform-origin: bottom right;
  color: #fff; z-index: 100 !important;
  pointer-events: auto;
}
body.chaos-mode .intro * { pointer-events: auto; }
body.chaos-mode .chaos-toggle { pointer-events: auto; cursor: pointer; position: relative; z-index: 101; }
body.chaos-mode .intro p:nth-of-type(2) { display: none; }
body.chaos-mode .nav-links { margin-top: var(--space-4); gap: var(--space-3); }
body.chaos-mode .greeting { font-size: 1.5rem; margin-bottom: var(--space-2); color: #fff; }
body.chaos-mode .lead {
  font-size: 0.9rem; margin-bottom: var(--space-3);
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; color: #ccc;
}
body.chaos-mode footer { display: none; }
body.chaos-mode .name {
  background: linear-gradient(
    135deg,
    #ff0080,
    #7928ca,
    #00c6ff
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Standard styles */
.greeting {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: var(--space-4); line-height: 1.1;
  transition: all 0.5s ease;
}
.name { transition: all 0.5s ease; }
.lead {
  font-size: 1.15rem; color: var(--color-text-muted);
  line-height: 1.6; margin-bottom: var(--space-4);
  transition: all 0.5s ease;
}
.nav-links {
  margin-top: var(--space-8);
  display: flex; gap: var(--space-6); flex-wrap: wrap;
}
.nav-links a {
  font-family: var(--font-mono); font-size: 0.9rem;
  color: var(--color-text); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid var(--color-border);
  transition: all 0.2s ease;
}
body.chaos-mode .nav-links a { color: #999; border-color: #444; }
.nav-links a:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }
body.chaos-mode .nav-links a:hover { color: #fff; border-color: #fff; }
.footer {
  padding: var(--space-6) var(--space-8);
  text-align: center; position: relative; z-index: 10;
}
.footer p {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--color-text-subtle); margin: 0;
}

@media (max-width: 768px) { main { padding: var(--space-12) var(--space-6); } }
