:root {
  /* Light mode (Apple default) */
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-hover: #fbfbfd;
  --border: rgba(0, 0, 0, 0.08);
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --accent: #0071e3;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark mode (iOS/macOS style) */
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-hover: #2c2c2e;
    --border: rgba(255, 255, 255, 0.12);
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent: #2997ff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  padding: 4rem 1.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 760px;
  margin: 0 auto;
}

header {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

p.subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 3rem 0 1.25rem;
  color: var(--text-primary);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition:
    transform 0.25s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.25s cubic-bezier(0.25, 1, 0.5, 1),
    background-color 0.2s ease;
}

a.card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  box-shadow: var(--shadow-hover);
}

a.card:active {
  transform: scale(0.99);
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.card p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-primary);
}

ul {
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

li {
  margin-bottom: 0.6rem;
}

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

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #334155;
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
}
