/* ==========================================================
   Kilion Tech — Design tokens, reset, base type
   ========================================================== */

:root {
  /* Surface */
  --bg: #0a0a0a;
  --bg-elev: oklch(0.145 0.008 300);
  --bg-elev-2: oklch(0.18 0.01 300);

  /* Lines */
  --line: oklch(0.28 0.012 300 / 0.6);
  --line-strong: oklch(0.4 0.02 300 / 0.8);

  /* Foreground */
  --fg: oklch(0.97 0.005 300);
  --fg-dim: oklch(0.72 0.01 300);
  --fg-mute: oklch(0.55 0.012 300);

  /* Brand */
  --accent: #c8a8e9;
  --accent-deep: #9b6fc4;
  --accent-glow: color-mix(in oklch, var(--accent) 18%, transparent);

  /* Type */
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --maxw: 1320px;
  --pad-x: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad-x); }

/* Decorative grain overlay */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/></svg>");
}

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Utility */
a.inline-link {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  padding-bottom: 1px; transition: border-color .2s;
}
a.inline-link:hover { border-bottom-color: var(--accent); }
