/* AI Links Page v2 - Distinctive dark theme with section accent colors */
/* Font: Outfit - clean geometric sans, distinctive but readable */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  /* Core palette - warm charcoal base */
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --bg-surface: #161618;
  --text: #e8e8ed;
  --text-muted: #8b8b96;
  --border: #252529;
  --border-subtle: #1c1c1f;

  /* Section accent colors */
  --accent-blog: #f472b6; /* Pink - Blog/Guides */
  --accent-pro: #fbbf24; /* Amber - Pro Tool */
  --accent-models: #60a5fa; /* Blue - Models */
  --accent-cli: #34d399; /* Emerald - CLI */
  --accent-settings: #a78bfa; /* Violet - Settings */
  --accent-resources: #fb923c; /* Orange - Resources */

  /* Functional */
  --link: #93c5fd;
  --link-hover: #bfdbfe;
  --code-bg: #1a1a1d;
  --glow-subtle: rgba(147, 197, 253, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Subtle background pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      ellipse 80% 50% at 50% -20%,
      rgba(147, 197, 253, 0.04),
      transparent
    ),
    radial-gradient(
      ellipse 60% 40% at 100% 100%,
      rgba(244, 114, 182, 0.03),
      transparent
    );
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent-cli);
}

/* ========== Layout ========== */
.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== Header ========== */
header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  animation: fadeSlideDown 0.4s ease-out;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
}

/* ========== Navigation TOC ========== */
nav.toc {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list li {
  animation: fadeIn 0.3s ease-out backwards;
}

.toc-list li:nth-child(1) {
  animation-delay: 0.05s;
}
.toc-list li:nth-child(2) {
  animation-delay: 0.1s;
}
.toc-list li:nth-child(3) {
  animation-delay: 0.15s;
}
.toc-list li:nth-child(4) {
  animation-delay: 0.2s;
}
.toc-list li:nth-child(5) {
  animation-delay: 0.25s;
}
.toc-list li:nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.toc-list a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 4px 0;
  display: inline-block;
  position: relative;
}

.toc-list a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--link);
  transition: width 0.2s ease;
}

.toc-list a:hover {
  color: var(--text);
}

.toc-list a:hover::after {
  width: 100%;
}

/* ========== Main Layout - Split View ========== */
main {
  padding: 32px 0 48px;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

/* ========== Links Column ========== */
.links-column {
  min-width: 0;
}

/* ========== Blog Sidebar ========== */
.blog-sidebar {
  position: sticky;
  top: 80px;
  animation: fadeSlideLeft 0.5s ease-out 0.2s backwards;
}

@keyframes fadeSlideLeft {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.blog-sidebar-inner {
  background: linear-gradient(
    145deg,
    var(--bg-elevated) 0%,
    var(--bg-surface) 100%
  );
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-blog);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.blog-sidebar h3 {
  margin: 0 0 20px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-blog);
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-sidebar h3::before {
  content: "📰";
}

.blog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.blog-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.blog-list li:first-child {
  padding-top: 0;
}

.blog-list a {
  font-weight: 500;
  font-size: 1rem;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
  line-height: 1.4;
  transition: color 0.15s ease, transform 0.15s ease;
}

.blog-list a:hover {
  color: var(--accent-blog);
  transform: translateX(4px);
}

.blog-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ========== Sections ========== */
section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  animation: fadeSlideUp 0.4s ease-out backwards;
}

section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered section animations */
section:nth-of-type(1) {
  animation-delay: 0.1s;
}
section:nth-of-type(2) {
  animation-delay: 0.15s;
}
section:nth-of-type(3) {
  animation-delay: 0.2s;
}
section:nth-of-type(4) {
  animation-delay: 0.25s;
}
section:nth-of-type(5) {
  animation-delay: 0.3s;
}
section:nth-of-type(6) {
  animation-delay: 0.35s;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

/* Section-specific accent colors on h2 */
#blog-links h2 {
  color: var(--accent-blog);
}
#pro-tool h2 {
  color: var(--accent-pro);
}
#models h2 {
  color: var(--accent-models);
}
#cli h2 {
  color: var(--accent-cli);
}
#settings h2 {
  color: var(--accent-settings);
}
#resources h2 {
  color: var(--accent-resources);
}

/* ========== Link Lists ========== */
.linklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.linklist li {
  padding: 10px 14px;
  margin: 0 -14px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.linklist li:hover {
  background: var(--glow-subtle);
}

/* Section-specific left border on hover */
#blog-links .linklist li:hover {
  border-left-color: var(--accent-blog);
}
#pro-tool .linklist li:hover {
  border-left-color: var(--accent-pro);
}
#models .linklist li:hover {
  border-left-color: var(--accent-models);
}
#cli .linklist li:hover {
  border-left-color: var(--accent-cli);
}
#settings .linklist li:hover {
  border-left-color: var(--accent-settings);
}
#resources .linklist li:hover {
  border-left-color: var(--accent-resources);
}

.linklist a {
  font-weight: 500;
  font-size: 0.975rem;
}

/* Section-specific link colors */
#blog-links .linklist a {
  color: var(--accent-blog);
}
#pro-tool .linklist a {
  color: var(--accent-pro);
}
#models .linklist a {
  color: var(--accent-models);
}
#cli .linklist a {
  color: var(--accent-cli);
}
#settings .linklist a {
  color: var(--accent-settings);
}
#resources .linklist a {
  color: var(--accent-resources);
}

.linklist a:hover {
  filter: brightness(1.2);
}

.desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 3px;
  line-height: 1.45;
}

.desc strong {
  color: var(--text);
  font-weight: 500;
}

/* ========== Footer ========== */
footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ========== Responsive ========== */
@media (min-width: 1600px) {
  .wrap {
    max-width: 1600px;
    padding: 0 48px;
  }

  h1 {
    font-size: 2.4rem;
  }

  .split-layout {
    grid-template-columns: 1fr 420px;
    gap: 56px;
  }
}

@media (max-width: 1024px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .blog-sidebar {
    position: static;
    order: -1; /* Blog appears first on mobile */
  }

  .blog-sidebar-inner {
    border-left: none;
    border-top: 3px solid var(--accent-blog);
  }
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 16px;
  }

  header {
    padding: 16px 0;
  }

  h1 {
    font-size: 1.5rem;
  }

  .tagline {
    font-size: 0.85rem;
  }

  .toc-list {
    gap: 6px 14px;
  }

  .toc-list a {
    font-size: 0.85rem;
  }

  main {
    padding: 24px 0 32px;
  }

  h2 {
    font-size: 1.15rem;
  }

  .blog-sidebar-inner {
    padding: 18px;
  }

  section {
    margin-bottom: 24px;
    padding-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 12px;
  }

  .brand {
    flex-direction: column;
    gap: 6px;
  }

  h1 {
    font-size: 1.25rem;
  }

  .toc-list {
    flex-direction: column;
    gap: 4px;
  }

  .linklist li {
    padding: 8px 10px;
    margin: 0 -10px;
  }

  .linklist a {
    font-size: 0.9rem;
  }

  .desc {
    font-size: 0.8rem;
  }
}
