/* Tailwind Base */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Theme: Garage Dark (Default) - High Contrast */
:root,
[data-theme="garage-dark"] {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --surface: #161616;
  --border: #2a2a2a;
  --text: #ffffff;
  --text-muted: #a3a3a3;
  --accent: #ff6b35;
  --accent-hover: #ff8555;
}

/* Base Styles */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* Utility Classes */
.bg-nova-bg { background: var(--bg); }
.bg-nova-surface { background: var(--surface); }
.border-nova-border { border-color: var(--border); }
.text-nova-text { color: var(--text); }
.text-nova-muted { color: var(--text-muted); }
.text-nova-accent { color: var(--accent); }

/* Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
  position: relative;
  padding-bottom: 16px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.timeline-item.future::before {
  background: var(--border);
}

/* Mobile Menu */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
}

.mobile-menu.hidden {
  display: none;
}

/* Video Container (16:9) */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

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

/* Prose Styles for Chapter Content */
.prose {
  color: var(--text-muted);
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text);
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.prose h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.25rem;
  color: var(--accent);
}

.prose p {
  margin-bottom: 1.5em;
}

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

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--accent-hover);
}

.prose ul,
.prose ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose ul li::marker {
  color: var(--accent);
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1em;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--text-muted);
}

.prose code {
  background: var(--surface);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.prose pre {
  background: var(--surface);
  padding: 1em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* Line Clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Hover Effects */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

/* Transitions */
.transition-all {
  transition: all 0.2s ease;
}

.transition-colors {
  transition: color 0.2s ease;
}

.transition-transform {
  transition: transform 0.3s ease;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg);
}
