/* Visual language inspired by cultofclaude.com — personal archive, not marketplace */
:root {
  --font-display: Inter, system-ui, -apple-system, sans-serif;
  --font-body: Inter, system-ui, -apple-system, sans-serif;

  /* Light */
  --bg: #f4f3ef;
  --bg-elevated: #ffffff;
  --ink: #141414;
  --ink-muted: #6b6b6b;
  --line: rgba(20, 20, 20, 0.12);
  --accent: #c9895a;
  --accent-soft: #f0e4d6;
  --accent-ink: #8a5a34;
  --warn: #b45309;
  --radius: 12px;
  --header-h: 3.5rem;
  --max: 760px;
}

html[data-theme="dark"] {
  /* cultofclaude-like charcoal + warm tan */
  --bg: #08080c;
  --bg-elevated: #121218;
  --ink: #eeeef0;
  --ink-muted: #9a9aa3;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #d4a373;
  --accent-soft: #2a2218;
  --accent-ink: #e4c29a;
  --warn: #f0b47a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", monospace;
  font-size: 0.86em;
  padding: 0.12em 0.35em;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid var(--line);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 0.85rem;
  background: var(--accent);
  color: #111;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

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

.brand-mark {
  width: 1.35rem;
  height: 1.35rem;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  background: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.github-link,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.github-link {
  gap: 0.35rem;
}

.github-link:hover,
.theme-toggle:hover {
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
  border-color: transparent;
}

.github-link svg,
.theme-toggle svg {
  display: block;
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
}

.github-star-count {
  min-width: 0.9rem;
  line-height: 1;
}

.section-head {
  margin-bottom: 1.35rem;
}

.section-kicker {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-lead {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tree-caret,
  .tree-skills-panel,
  .tree-skills {
    transition: none !important;
  }
}
