/* ============================================================
   Nicholas Volker Moorcroft · CV
   Light theme · timeline-centric · one accent
   ============================================================ */

:root {
  --paper:      #FBFAF6;
  --paper-2:    #F4F1E9;
  --card:       #FFFFFF;
  --ink:        #16161A;
  --ink-2:      #54535C;
  --ink-3:      #8A8893;
  --hair:       #E7E3D8;
  --hair-2:     #DAD5C7;
  --accent:     #2438E0;
  --accent-ink: #1B2BB0;
  --accent-soft:#EAEBFB;
  --accent-line:#C9CDF6;

  --maxw: 1080px;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

em { font-style: italic; }

::selection { background: var(--accent); color: #fff; }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 100;
  background: transparent;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: var(--accent);
  transition: width .1s linear;
}

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--hair); }

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.brand-mark {
  font-family: var(--font-mono); font-weight: 700; font-size: .78rem;
  letter-spacing: .06em;
  display: grid; place-items: center;
  min-width: 34px; height: 30px; padding: 0 .45rem; border-radius: 7px;
  background: var(--ink); color: var(--paper);
}
.brand-name { font-family: var(--font-display); font-size: .98rem; letter-spacing: -.01em; }

.site-nav { display: flex; gap: 1.6rem; }
.site-nav a {
  font-size: .9rem; color: var(--ink-2); font-weight: 500;
  position: relative; padding: .2rem 0;
  transition: color .2s var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width .25s var(--ease);
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.site-nav a.active::after { width: 100%; }

/* ---------- shared section scaffolding ---------- */
section { padding-left: var(--gutter); padding-right: var(--gutter); }

.section-head { max-width: var(--maxw); margin: 0 auto; }
.section-index {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-ink);
  margin-bottom: .9rem;
}
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  letter-spacing: -.02em; line-height: 1.12; max-width: 18ch;
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 6rem; padding-bottom: 4rem;
  position: relative;
}
.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono); font-size: .82rem;
  letter-spacing: .03em; color: var(--ink-2);
  margin-bottom: 1.8rem;
}
.kicker .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-line {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  line-height: 1.02; letter-spacing: -.035em;
  margin-bottom: 1.6rem;
}
.hero-line em { color: var(--accent); font-style: normal; }

.hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--ink-2); max-width: 56ch; line-height: 1.55;
}

.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.tag {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--ink-2); padding: .35rem .7rem;
  border: 1px solid var(--hair-2); border-radius: 999px;
  background: var(--paper-2);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.btn {
  font-weight: 500; font-size: .95rem;
  padding: .72rem 1.3rem; border-radius: 10px;
  border: 1px solid var(--hair-2); background: var(--card);
  transition: transform .15s var(--ease), border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }

.scroll-cue {
  position: absolute; bottom: 2rem; left: 2px;
  display: block;
}
.scroll-track {
  display: block; width: 72px; height: 1px;
  background: var(--hair-2); position: relative; overflow: hidden;
}
.scroll-bead {
  position: absolute; top: -1.5px; left: 0;
  width: 18px; height: 4px; border-radius: 2px;
  background: var(--accent);
  animation: scrollbead 2.2s var(--ease) infinite;
}
@keyframes scrollbead {
  0%   { transform: translateX(-22px); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateX(72px); opacity: 0; }
}

/* ---------- timeline ---------- */
.story { padding-top: 2.5rem; padding-bottom: 7rem; }
.story .section-head { margin-bottom: 3.5rem; }

.timeline {
  list-style: none;
  max-width: var(--maxw); margin: 0 auto;
  position: relative;
  padding-left: 2.4rem;
}
/* the spine */
.timeline::before {
  content: ""; position: absolute; top: .4rem; bottom: 0; left: 7px;
  width: 2px;
  background: linear-gradient(var(--accent-line), var(--accent-line) 86%, transparent);
}

.node { position: relative; padding-bottom: 3.2rem; }
.node:last-child { padding-bottom: 0; }

.node-dot {
  position: absolute; left: -2.4rem; top: .35rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--paper);
}
.node-flagship .node-dot,
.node-promote .node-dot { background: var(--accent); }
.node-founder .node-dot { background: var(--ink); border-color: var(--ink); }

.node-dot-open {
  border-style: dashed; border-color: var(--ink-3);
  background: var(--paper);
}
/* open-road: spine fades into dashes behind the final node */
.node-future::before {
  content: ""; position: absolute; left: -2.33rem; top: 1.6rem; bottom: -2rem;
  width: 0; border-left: 2px dashed var(--accent-line);
  -webkit-mask-image: linear-gradient(#000, transparent);
          mask-image: linear-gradient(#000, transparent);
}

.node-when {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .03em;
  color: var(--accent-ink); margin-bottom: .35rem;
}
.node-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  letter-spacing: -.02em; line-height: 1.15; margin-bottom: .55rem;
}
.node-lead { color: var(--ink-2); max-width: 60ch; }
.node-lead a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.node-lead a:hover { border-color: var(--accent); }

/* flagship node gets a soft card */
.node-flagship {
  background: var(--paper-2);
  border: 1px solid var(--hair);
  border-radius: 16px;
  padding: 1.6rem 1.6rem 1.8rem;
  margin-left: -.4rem;
  margin-bottom: 2.8rem;
}
.node-flagship .node-dot { top: 1.95rem; }

/* expandable detail */
.node-more { margin-top: 1rem; }
.node-more summary {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em;
  color: var(--ink); cursor: pointer;
  list-style: none; padding: .35rem 0;
  width: fit-content;
}
.node-more summary::-webkit-details-marker { display: none; }
.node-more summary::before {
  content: "+"; display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: .9rem; line-height: 1;
  transition: transform .25s var(--ease), background .2s var(--ease);
}
.node-more[open] summary::before { content: "\2013"; background: var(--accent); }
.node-more summary:hover::before { background: var(--accent); }

.more-body {
  padding-top: .9rem; max-width: 64ch;
  animation: fade-in .35s var(--ease);
}
.more-body p { color: var(--ink-2); margin-bottom: .7rem; }
.more-body ul { list-style: none; display: grid; gap: .55rem; }
.more-body li {
  position: relative; padding-left: 1.1rem; color: var(--ink-2); font-size: .96rem;
}
.more-body li::before {
  content: ""; position: absolute; left: 0; top: .62rem;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.more-body strong { color: var(--ink); font-weight: 600; }
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px);} to { opacity: 1; transform: none;} }

.node-future .node-title { color: var(--ink); }
.node-future .node-lead { max-width: 52ch; }

/* ---------- strengths ---------- */
.strengths { background: var(--paper-2); padding-top: 6rem; padding-bottom: 6rem; }
.strengths .section-head { margin-bottom: 2.8rem; }
.strength-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.strength {
  background: var(--card); border: 1px solid var(--hair);
  border-radius: 16px; padding: 1.5rem 1.4rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.strength:hover { transform: translateY(-3px); box-shadow: 0 12px 30px -18px rgba(20,20,30,.25); border-color: var(--hair-2); }
.s-num { font-family: var(--font-mono); font-size: .8rem; color: var(--accent-ink); }
.strength h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  letter-spacing: -.01em; margin: .6rem 0 .5rem; line-height: 1.2;
}
.strength p { font-size: .96rem; color: var(--ink-2); }

/* ---------- writing ---------- */
.writing { padding-top: 6rem; padding-bottom: 6rem; }
.writing .section-head { margin-bottom: 2.4rem; }
.writing-list { list-style: none; max-width: var(--maxw); margin: 0 auto; }
.writing-list li { border-top: 1px solid var(--hair); }
.writing-list li:last-child { border-bottom: 1px solid var(--hair); }
.w-link {
  display: grid;
  grid-template-columns: 120px 1fr auto; align-items: center; gap: 1.2rem;
  padding: 1.3rem .4rem; transition: padding .25s var(--ease), background .25s var(--ease);
}
a.w-link:hover { padding-left: 1.1rem; background: var(--paper-2); }
.w-kind { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.w-title { font-family: var(--font-display); font-weight: 500; font-size: 1.08rem; letter-spacing: -.01em; }
.w-where { font-size: .85rem; color: var(--ink-3); text-align: right; }
a.w-link .w-title { transition: color .2s var(--ease); }
a.w-link:hover .w-title { color: var(--accent); }

.w-link.w-soon { background: var(--accent-soft); border-radius: 12px; padding: 1.15rem 1.25rem; margin: .2rem 0; }
.w-soon .w-kind { color: var(--accent); }
.w-soon .w-title { font-style: italic; color: var(--ink); }

/* ---------- contact ---------- */
.contact { padding-top: 6rem; padding-bottom: 7rem; }
.contact-inner { max-width: var(--maxw); margin: 0 auto; }
.contact-line {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.03em;
  line-height: 1.08; margin: .8rem 0 1.1rem; max-width: 16ch;
}
.contact-sub { color: var(--ink-2); max-width: 52ch; font-size: 1.08rem; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--hair);
  padding: 2rem var(--gutter);
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center;
  font-family: var(--font-mono); font-size: .78rem; color: var(--ink-3);
}
.foot-dot { color: var(--hair-2); }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-nav { display: none; }
  .strength-grid { grid-template-columns: 1fr; }
  .w-link { grid-template-columns: 1fr; gap: .25rem; padding: 1.1rem .2rem; }
  .w-where { text-align: left; }
  .node-flagship { padding: 1.3rem 1.1rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- print / PDF ---------- */
@media print {
  :root { --paper: #fff; --paper-2: #fff; }
  .scroll-progress, .site-header, .scroll-cue, .site-nav { display: none !important; }
  body { font-size: 11pt; }
  .hero { min-height: auto; padding-top: 1rem; }
  .node-more[open] summary, .node-more summary { display: none; }
  .more-body { display: block !important; padding-top: .3rem; }
  .node-more > .more-body { animation: none; }
  details > .more-body { display: block; }
  .strength:hover, .btn { transform: none; }
  section { padding: 1.2rem 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; }
}
