:root {
  --bg: #ffffff;
  --bg-secondary: #f7f7f8;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --muted: #888888;
  --border: #e8e8ec;
  --accent: #7c3aed;
  --accent-light: #ede9fe;
  --accent-glow: rgba(124, 58, 237, 0.12);
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --bg-secondary: #111111;
    --text: #e5e5e5;
    --text-secondary: #a0a0a0;
    --muted: #666666;
    --border: #1f1f1f;
    --accent: #a78bfa;
    --accent-light: #1a1128;
    --accent-glow: rgba(167, 139, 250, 0.1);
    --card-bg: #141414;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    --card-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
  }
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding: 0 1.25rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 0 4rem;
}

/* ── Header ── */
.site-header {
  padding: 1.25rem 0;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
}

.site-header .brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-header .brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.site-header nav {
  display: flex;
  gap: 0.25rem;
}

.site-header nav a {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.site-header nav a:hover {
  color: var(--accent);
  background: var(--accent-glow);
  text-decoration: none;
}

/* ── Hero (index page) ── */
.hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.hero .tagline {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 0;
}

/* ── Link cards (index page) ── */
.cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--card-shadow);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
  text-decoration: none;
}

.link-card:active {
  transform: translateY(0);
}

.link-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #ffffff;
}

.link-card-content h3 {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.link-card-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.825rem;
  line-height: 1.4;
}

.link-card .arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 1.1rem;
  transition: color 0.15s, transform 0.15s;
}

.link-card:hover .arrow {
  color: var(--accent);
  transform: translateX(2px);
}

/* ── Typography (content pages) ── */
h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.025rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.4rem;
}

p {
  margin-bottom: 0.9rem;
  color: var(--text-secondary);
}

h1 + p, h2 + p, h3 + p {
  margin-top: 0.1rem;
}

.subtitle {
  color: var(--muted);
  font-size: 0.8125rem;
  margin-bottom: 2.25rem;
  letter-spacing: 0.01em;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

li {
  margin-bottom: 0.3rem;
}

li strong {
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.12s;
}

a:hover {
  text-decoration: underline;
}

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

/* ── Content cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--card-shadow);
}

.card h3 {
  margin-top: 0;
}

/* ── Footer ── */
.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .site-header nav a {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  .hero {
    padding: 2rem 0 2rem;
  }

  .hero h1 {
    font-size: 1.65rem;
  }

  .link-card {
    padding: 1rem 1.1rem;
  }

  .link-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}
