/* Hyadhuad — same tokens as drayker.org, drayker.com and the drayker-theme.
   Canvas #08080A · surface #0C0C0F · border #18181E · text #EDECF0 · muted #8585A0
   accent #FF5500 · display Archivo · technical JetBrains Mono · width 1320px */
:root {
  --bg: #08080a;
  --surface: #0c0c0f;
  --border: #18181e;
  --border-2: #222230;
  --text: #edecf0;
  --muted: #9898a8;
  --dim: #65657a;
  --accent: #ff5500;
  --accent-2: #ff7a33;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
  --gutter: clamp(16px, 4vw, 44px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }
img { max-width: 100%; height: auto; display: block; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--bg); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.head { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 12, 0.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.head-in { max-width: 1320px; margin: 0 auto; padding: 13px var(--gutter); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); text-decoration: none; }
.brand strong { font-size: 17px; font-weight: 600; letter-spacing: 0.02em; }
.brand span { font-family: var(--mono); font-size: 10px; color: #6a6a80; letter-spacing: 0.08em; }
.head-links { display: flex; gap: clamp(8px, 1.6vw, 18px); flex-wrap: wrap; margin-left: auto; }
.head-links a { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--dim); border: 1px solid var(--border-2); padding: 6px 10px; }
.head-links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
@media (max-width: 560px) { .brand span { display: none; } .head-links a { padding: 5px 7px; font-size: 10px; } }

/* Shared type */
.kicker, .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
h1, h2, h3 { letter-spacing: -0.03em; text-wrap: balance; }
h2 { font-size: clamp(26px, 3.4vw, 42px); line-height: 1.08; font-weight: 700; margin: 0 0 28px; max-width: 26ch; }
.sub { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); font-weight: 500; margin: 56px 0 18px; }
.prose p { color: var(--muted); max-width: 64ch; margin: 0 0 18px; text-wrap: pretty; }
.prose em, .lead em { color: var(--text); font-style: italic; }
.narrow { max-width: 64ch; }

/* Hero */
.hero { border-bottom: 1px solid var(--border); padding: clamp(48px, 9vw, 120px) 0 clamp(36px, 6vw, 72px); }
.hero h1 { font-size: clamp(34px, 6vw, 76px); line-height: 1; font-weight: 700; letter-spacing: -0.04em; margin: 0; max-width: 18ch; }
.lead { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.62; color: var(--muted); max-width: 60ch; margin: 26px 0 0; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.button { display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; background: var(--accent); color: var(--bg); border: 1px solid var(--accent); padding: 12px 18px; }
.button:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--bg); text-decoration: none; }
.button-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.button-ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); margin: clamp(40px, 6vw, 72px) 0 0; }
.facts div { background: var(--bg); padding: 20px; }
.facts dt { font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.facts dd { margin: 10px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--dim); line-height: 1.5; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }

/* Sections */
.section { border-bottom: 1px solid var(--border); padding: clamp(56px, 8vw, 104px) 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; } }
.quote { margin: 0; border-left: 2px solid var(--accent); background: var(--surface); padding: 22px 24px; }
.quote p { margin: 0 0 14px; font-size: 17px; line-height: 1.55; color: var(--text); }
.quote cite { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.card { display: flex; flex-direction: column; gap: 8px; height: 100%; background: var(--bg); padding: 20px; color: var(--text); }
.card:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.card:hover .card-k { color: var(--accent); }
.card-k { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.card-k::after { content: " ↗"; color: var(--dim); font-size: 14px; }
.card-t { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.note { color: var(--muted); margin: 24px 0 0; max-width: 72ch; }

/* Book */
.book { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: start; }
@media (min-width: 820px) { .book { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 64px; } }
.cover { margin: 0; max-width: 300px; border: 1px solid var(--border); }
.subtitle { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--dim) !important; margin-top: -16px !important; }
.editions { font-size: 14.5px; }

/* Method */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.steps li { background: var(--bg); padding: 22px; }
.steps span { display: block; font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 14px; }
.steps strong { font-size: 18px; letter-spacing: -0.02em; }
.steps p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 8px 0 0; }

/* Contact */
.links { border-top: 1px solid var(--border); max-width: 760px; }
.link-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid var(--border); color: var(--text); font-size: 18px; }
.link-row span:last-child { font-family: var(--mono); font-size: 12.5px; color: var(--dim); align-self: center; }
.link-row:hover { color: var(--accent); text-decoration: none; }
.link-row:hover span:last-child { color: var(--accent); }

.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 26px var(--gutter); font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: 0.06em; }

/* Story timeline */
.timeline { list-style: none; margin: 48px 0 0; padding: 0; border-top: 1px solid var(--border); }
.chapter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 32px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 820px) { .chapter { grid-template-columns: 200px minmax(0, 1fr); gap: 48px; } }
.when { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); padding-top: 6px; }
.what h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.2; font-weight: 600; margin: 0 0 14px; max-width: 34ch; }
.what p { color: var(--muted); max-width: 68ch; margin: 0 0 14px; text-wrap: pretty; }
.what .trait { display: inline-block; margin: 4px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); border: 1px solid var(--border-2); padding: 6px 10px; }
.what .trait::before { content: "→ "; color: var(--accent); }
.is-now .what h3 { color: var(--accent); }
.section, .hero { scroll-margin-top: 110px; }

/* Hero portrait */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); } }
.portrait { margin: 0; max-width: 420px; border: 1px solid var(--border); position: relative; }
.portrait img { aspect-ratio: 763 / 1100; object-fit: cover; }
.portrait::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }
@media (max-width: 899px) { .portrait { max-width: 340px; } }
@media (max-width: 899px) { .portrait img { aspect-ratio: 1 / 1; object-position: 50% 78%; } }

/* Research */
.theories { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin-top: 36px; }
@media (max-width: 400px) { .theories { grid-template-columns: 1fr; } }
.card-static:hover { background: var(--bg); }
.card-static .card-k::after { content: none; }
.card-y { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.card-static .card-k { font-size: 19px; line-height: 1.25; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.tags li { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--text); border: 1px solid var(--border-2); padding: 7px 10px; }

/* Language switch */
.head-links a.lang { color: var(--accent); border-color: var(--accent); }
.head-links a.lang:hover { background: var(--accent); color: var(--bg); }
