/* ============================================================
   Dennis Maine — Founder
   Dark · Engineered · Single accent (electric cyan)
   ============================================================ */

:root {
  --bg:           #0a0a0f;
  --bg-elev:      #11121a;
  --bg-elev-2:    #16172380;
  --bg-card:      #14151f;
  --bg-card-2:    #1a1b27;
  --line:         rgba(255, 255, 255, 0.06);
  --line-2:       rgba(255, 255, 255, 0.12);
  --line-3:       rgba(255, 255, 255, 0.20);
  --ink:          #ededf2;
  --ink-mute:     #8b8d9b;
  --ink-dim:      #56586a;
  --accent:       #7df9ff;
  --accent-2:     #5dd4d9;
  --accent-soft:  rgba(125, 249, 255, 0.10);
  --accent-glow:  rgba(125, 249, 255, 0.18);
  --green:        #4ade80;
  --green-soft:   rgba(74, 222, 128, 0.16);
  --err:          #ff6b6b;
  --err-soft:     rgba(255, 107, 107, 0.14);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --maxw: 1200px;
  --gutter: 28px;

  --shadow-1: 0 4px 16px rgba(0,0,0,.3);
  --shadow-2: 0 20px 60px rgba(0,0,0,.55);

  --ff-sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --ff-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --t-fast: 180ms cubic-bezier(.2,.7,.2,1);
  --t-base: 320ms cubic-bezier(.2,.7,.2,1);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); position: relative; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg); padding: 12px 16px; z-index: 999;
  border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ── Background effects ───────────────────────────────────── */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-light {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  opacity: 0;
  transition: opacity 600ms ease;
  filter: blur(20px);
}
@media (hover: hover) and (pointer: fine) {
  .cursor-light.is-active { opacity: 1; }
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--ff-sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.12; letter-spacing: -0.03em; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 1rem; font-weight: 600; letter-spacing: -0.005em; }

.hi { color: var(--accent); }
.dim { color: var(--ink-dim); }
.err { color: var(--err); }
.mono { font-family: var(--ff-mono); }
.muted { color: var(--ink-mute); }
.muted.small { font-size: 0.84rem; }
.center { text-align: center; }

/* ── Kicker / status pill ─────────────────────────────────── */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px;
  color: var(--ink-mute);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  margin: 0 0 32px;
  font-family: var(--ff-mono);
  letter-spacing: 0.02em;
}
.kicker .mono { color: var(--accent); }
.kicker-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.pulse {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}
.pulse-green { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.pulse-cyan  { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.tag {
  display: inline-flex;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 500;
}
.tag-cyan { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-soft); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform var(--t-fast), background var(--t-fast),
              color var(--t-fast), border-color var(--t-fast),
              box-shadow var(--t-fast);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: var(--bg); font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-2); color: var(--bg); transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--accent-2), 0 12px 32px var(--accent-glow);
}
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--line-3); background: var(--bg-elev); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 500; font-size: 0.95rem;
  font-family: var(--ff-mono);
}
.link-arrow:hover { color: var(--accent-2); gap: 12px; transition: gap var(--t-fast); }

.inline-link {
  color: var(--accent);
  background: linear-gradient(0deg, var(--accent-soft) 50%, transparent 50%);
  background-size: 100% 0%;
  background-repeat: no-repeat;
  background-position: bottom;
  transition: background-size var(--t-base);
  padding: 0 2px;
}
.inline-link:hover { background-size: 100% 100%; color: var(--accent); }

/* ── Header / nav ─────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 15, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gutter);
}
.logo { display: flex; align-items: center; gap: 12px; transition: opacity var(--t-fast); }
.logo:hover { opacity: 0.85; color: var(--ink); }
.logo-mark {
  position: relative;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font-family: var(--ff-mono);
  font-weight: 700; font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  overflow: hidden;
}
.logo-mark::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 100%, var(--accent-glow), transparent 70%);
  opacity: 0.6;
}
.logo-mark-text { position: relative; z-index: 1; }
.logo-mark-dot {
  position: absolute;
  bottom: 4px; right: 4px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  z-index: 2;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.logo-role {
  font-family: var(--ff-mono);
  font-size: 0.7rem; color: var(--ink-dim);
  letter-spacing: 0.02em; margin-top: 1px;
}

.primary-nav { display: flex; gap: 4px; align-items: center; }
.primary-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.9rem; color: var(--ink-mute);
  padding: 8px 14px; border-radius: 8px;
  position: relative;
  transition: color var(--t-fast), background var(--t-fast);
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-elev); }
.nav-num { font-family: var(--ff-mono); font-size: 0.72rem; color: var(--ink-dim); }
.primary-nav a:hover .nav-num,
.primary-nav a[aria-current="page"] .nav-num { color: var(--accent); }

.nav-cta {
  margin-left: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  color: var(--ink) !important;
}
.nav-cta:hover { border-color: var(--accent); background: var(--accent-soft); }
.cta-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

.nav-toggle {
  display: none;
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 10px;
  flex-direction: column; gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 0 60px;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -20%; left: 50%; transform: translateX(-50%);
  width: 1000px; height: 800px;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  opacity: 0.4;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center center;
  opacity: 0.5;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-left { max-width: 640px; }
.hero-title {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin: 0 0 30px;
}
.hero-line { display: block; }
.hero-accent {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
.hero-accent::after {
  content: "";
  position: absolute;
  left: 0; bottom: -8px;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.5;
}

.hero-lede {
  font-size: 1.1rem;
  color: var(--ink-mute);
  max-width: 56ch;
  margin: 0 0 36px;
  line-height: 1.6;
}
.hero-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.hero-right { position: relative; z-index: 2; }

/* ── Status panel ─────────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  position: relative;
}
.panel::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.panel > * { position: relative; z-index: 1; }

.panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.panel-dots { display: inline-flex; gap: 6px; }
.panel-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-dim); }
.panel-dots span:nth-child(1) { background: #ff5f57; }
.panel-dots span:nth-child(2) { background: #febc2e; }
.panel-dots span:nth-child(3) { background: #28c840; }
.panel-title { font-size: 0.78rem; color: var(--ink-dim); margin-left: 6px; }

.panel-body { padding: 18px 18px 14px; }
.panel-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.88rem;
}
.panel-row:last-child { border-bottom: 0; }
.panel-key { font-size: 0.76rem; color: var(--ink-dim); letter-spacing: 0.02em; }
.panel-val { color: var(--ink); }

.panel-foot {
  display: flex; justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem; color: var(--ink-dim);
  background: var(--bg-elev);
}
.panel-foot span:last-child { color: var(--green); }

/* ── Marquee ──────────────────────────────────────────────── */
.hero-marquee {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  position: relative;
  z-index: 2;
}
.marquee {
  display: flex; gap: 32px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  color: var(--ink-dim);
  letter-spacing: 0.15em;
  will-change: transform;
}
.marquee span:nth-child(odd) { color: var(--ink-mute); }
.marquee span:nth-child(even) { color: var(--accent); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Section base ─────────────────────────────────────────── */
.section { position: relative; padding: 120px 0; border-top: 1px solid var(--line); }
.section-anchor {
  font-size: 0.72rem; color: var(--ink-dim);
  letter-spacing: 0.18em; margin-bottom: 40px;
  display: block;
}
.section-anchor.center { text-align: center; }

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 18px;
}
.section-sub { color: var(--ink-mute); max-width: 58ch; font-size: 1.02rem; margin: 0; }
.section-head { margin-bottom: 64px; max-width: 720px; }

/* ── About ────────────────────────────────────────────────── */
.section-about { background: var(--bg); }
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: center;
}
.portrait { margin: 0; }
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-2);
}
.portrait-glow {
  position: absolute;
  top: -20%; right: -20%;
  width: 80%; height: 80%;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}
.portrait img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}
.portrait figcaption {
  margin-top: 14px;
  font-size: 0.72rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

/* Markdown content rendered into homepage sections */
.markdown-content p { margin: 0 0 18px; color: var(--ink-mute); font-size: 1.02rem; line-height: 1.7; }
.markdown-content p:last-child { margin-bottom: 0; }
.markdown-content strong { color: var(--ink); font-weight: 600; }
.markdown-content em { color: var(--ink); font-style: italic; }
.markdown-content a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.markdown-content a:hover { border-bottom-color: var(--accent); }
.markdown-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 48px 0 18px;
  color: var(--ink);
}
.markdown-content h3 {
  font-size: 1.25rem; font-weight: 600;
  margin: 32px 0 12px;
  color: var(--ink);
}
.markdown-content ul, .markdown-content ol {
  margin: 0 0 20px;
  padding-left: 0;
  list-style: none;
}
.markdown-content ul li, .markdown-content ol li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--ink-mute);
}
.markdown-content ul li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--ff-mono);
  font-weight: 600;
}
.markdown-content ol { counter-reset: mdc; }
.markdown-content ol li { counter-increment: mdc; }
.markdown-content ol li::before {
  content: counter(mdc, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--ff-mono);
  font-size: 0.85em;
  font-weight: 600;
}
.markdown-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 8px 0 8px 22px;
  margin: 24px 0;
  color: var(--ink);
  font-size: 1.1rem;
}
.markdown-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

.about-body .markdown-content { margin-bottom: 0; }

.quick-facts {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: grid; gap: 14px;
}
.quick-facts > div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  font-size: 0.9rem;
}
.qf-key { color: var(--ink-dim); font-size: 0.72rem; letter-spacing: 0.06em; padding-top: 3px; }
.qf-val { color: var(--ink); }

/* ── Ventures ─────────────────────────────────────────────── */
.section-ventures { background: var(--bg); }
.ventures-content {
  max-width: 920px;
}
.ventures-content h2 {
  font-size: clamp(2rem, 3.6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink), var(--ink-mute));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
.ventures-content h2::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  margin-right: 14px;
  vertical-align: middle;
  position: relative; top: -4px;
}
.ventures-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 32px 0 10px;
  color: var(--ink);
}
.ventures-content > p:first-of-type {
  font-size: 0.86rem;
  font-family: var(--ff-mono);
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}
.ventures-content > p strong {
  color: var(--accent);
  font-family: var(--ff-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.venture-next {
  margin-top: 60px;
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--ink-mute);
}

/* ── Manifesto ────────────────────────────────────────────── */
.section-manifesto {
  padding: 140px 0;
  border-top: 1px solid var(--line);
  background: radial-gradient(ellipse at top, var(--accent-glow), transparent 50%), var(--bg);
  position: relative;
}
.manifesto-wrap { max-width: 920px; margin: 0 auto; text-align: center; }
.manifesto-eyebrow { font-size: 0.78rem; color: var(--accent); letter-spacing: 0.1em; margin: 0 0 30px; }
.manifesto-text {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0;
}

/* ── Approach ─────────────────────────────────────────────── */
/* FIX: hover used to shift padding-left → caused layout reflow + page jitter.
   Now uses transform: translateX which is composited, no reflow. */
.section-approach { background: var(--bg); }
.approach-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.principles li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  align-items: start;
  transition: transform var(--t-base);
  will-change: transform;
}
.principles li:hover { transform: translateX(8px); }
.principles li:last-child { border-bottom: 1px solid var(--line); }
.pri-num { font-size: 0.82rem; color: var(--accent); padding-top: 4px; font-weight: 600; }
.principles h3 { font-size: 1.1rem; margin: 0 0 4px; color: var(--ink); font-weight: 600; }
.principles p { color: var(--ink-mute); margin: 0; font-size: 0.95rem; }

/* ── Writing (homepage preview) ───────────────────────────── */
.section-writing { background: var(--bg); }
.writing-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: 48px;
}
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card {
  display: flex; flex-direction: column;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--t-base), transform var(--t-base);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--t-base);
}
.post-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.post-card:hover::before { width: 100%; }
.post-card time { font-family: var(--ff-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-dim); }
.post-card h3 {
  margin: 12px 0 12px;
  font-size: 1.18rem; font-weight: 600;
  letter-spacing: -0.015em; line-height: 1.25; color: var(--ink);
}
.post-card p { color: var(--ink-mute); font-size: 0.92rem; margin: 0 0 22px; flex: 1; line-height: 1.55; }
.post-card .read { font-family: var(--ff-mono); color: var(--accent); font-size: 0.78rem; font-weight: 500; }

/* ── Contact ──────────────────────────────────────────────── */
.section-contact {
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 50%), var(--bg);
  text-align: center;
  padding: 140px 0;
}
.contact-wrap { max-width: 760px; margin: 0 auto; }
.contact-title {
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
}
.contact-sub { color: var(--ink-mute); max-width: 56ch; margin: 0 auto 40px; font-size: 1.05rem; }
.mail-cta {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--ff-mono);
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  color: var(--accent);
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  padding: 18px 28px;
  border-radius: 12px;
  margin-bottom: 40px;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  word-break: break-all;
}
.mail-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
}
.social { list-style: none; padding: 0; margin: 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.social a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem;
  color: var(--ink-mute);
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.social a .mono { color: var(--accent); font-size: 0.8rem; }
.social a:hover { border-color: var(--line-2); color: var(--ink); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 50px 0 40px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand .logo-mark { width: 38px; height: 38px; }
.footer-brand p { margin: 0; }
.footer-nav { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-mute); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--ink); }
.footer-meta { text-align: right; }
.footer-meta p { margin: 0; font-size: 0.78rem; color: var(--ink-mute); }
.footer-meta .dim { color: var(--ink-dim); }

/* ── Writing index page (/writing/) ───────────────────────── */
.section-writing-index { padding: 120px 0 140px; }
.writing-page-head { max-width: 820px; margin-bottom: 80px; }
.writing-page-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 24px;
}
.writing-page-sub { color: var(--ink-mute); font-size: 1.1rem; max-width: 60ch; margin: 0; }

.writing-list { display: flex; flex-direction: column; }
.writing-row {
  display: grid;
  grid-template-columns: 160px 1fr 30px;
  align-items: baseline;
  gap: 32px;
  padding: 28px 20px;
  margin: 0 -20px;
  border-top: 1px solid var(--line);
  border-radius: 8px;
  transition: background var(--t-base), transform var(--t-base);
  will-change: transform;
}
.writing-row:last-child { border-bottom: 1px solid var(--line); }
.writing-row:hover {
  background: linear-gradient(90deg, var(--bg-elev), transparent);
  transform: translateX(8px);
}
.writing-row time { font-family: var(--ff-mono); color: var(--ink-dim); font-size: 0.78rem; letter-spacing: 0.04em; }
.writing-row h3 { font-weight: 600; font-size: 1.35rem; letter-spacing: -0.015em; line-height: 1.25; margin: 0 0 6px; color: var(--ink); }
.writing-row p { color: var(--ink-mute); margin: 0; font-size: 0.95rem; }
.writing-row .arrow { color: var(--accent); font-size: 1.1rem; }

/* ── Writing post page (single article) ───────────────────── */
.post-article { max-width: 720px; margin: 0 auto; padding: 80px 24px 120px; }
.post-article > header { margin-bottom: 44px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.post-article > header time { font-family: var(--ff-mono); color: var(--ink-dim); font-size: 0.78rem; letter-spacing: 0.04em; }
.post-article > header h1 {
  margin: 16px 0 18px;
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.post-article .post-lede { font-size: 1.18rem; color: var(--ink-mute); margin: 0; line-height: 1.5; }
.post-article .post-body { font-size: 1.04rem; }
.post-article .post-body p { margin: 0 0 1.35em; color: var(--ink); line-height: 1.7; }
.post-article .post-body h2 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; margin: 2.2em 0 0.6em; }
.post-article .post-body h3 { font-size: 1.2rem; font-weight: 600; margin: 1.8em 0 0.5em; }
.post-article .post-body a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.post-article .post-body a:hover { border-bottom-color: var(--accent); }
.post-article .post-body img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 32px 0;
}
.post-article .post-body code {
  background: var(--bg-elev);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.9em;
  font-family: var(--ff-mono);
  border: 1px solid var(--line);
}
.post-article .post-body pre {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 22px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 24px 0;
}
.post-article .post-body pre code { background: transparent; padding: 0; border: 0; }
.post-article .post-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 22px;
  color: var(--ink-mute);
  margin: 1.6em 0;
}
.post-article .post-body ul, .post-article .post-body ol {
  margin: 0 0 1.4em;
  padding-left: 0;
  list-style: none;
}
.post-article .post-body ul li, .post-article .post-body ol li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--ink);
  line-height: 1.65;
}
.post-article .post-body ul li::before {
  content: "›";
  position: absolute; left: 0;
  color: var(--accent);
  font-family: var(--ff-mono); font-weight: 600;
}
.post-article .post-body ol { counter-reset: pst; }
.post-article .post-body ol li { counter-increment: pst; }
.post-article .post-body ol li::before {
  content: counter(pst, decimal-leading-zero);
  position: absolute; left: 0;
  color: var(--accent);
  font-family: var(--ff-mono); font-size: 0.85em; font-weight: 600;
}
.post-author {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex; gap: 18px; align-items: center;
}
.post-author img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line-2); }
.post-author strong { display: block; color: var(--ink); font-size: 0.95rem; }
.post-author span { color: var(--ink-mute); font-size: 0.85rem; font-family: var(--ff-mono); }

.post-nav {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── 404 page ─────────────────────────────────────────────── */
.notfound {
  min-height: calc(100vh - 200px);
  display: grid;
  place-items: center;
  padding: 80px 0;
}
.notfound-wrap { width: 100%; max-width: 680px; padding: 0 var(--gutter); }
.notfound-panel {
  background: var(--bg-card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.notfound-panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.notfound-panel-body { padding: 40px 36px 44px; }
.notfound-code {
  font-size: 0.85rem;
  margin: 0 0 16px;
  color: var(--ink);
}
.notfound-line {
  font-size: 0.82rem;
  margin: 0 0 8px;
  color: var(--ink-mute);
}
.notfound-line:last-of-type { margin-bottom: 32px; }
.notfound-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 18px;
}
.notfound-lede {
  color: var(--ink-mute);
  font-size: 1.05rem;
  max-width: 48ch;
  margin: 0 0 32px;
}
.notfound-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Reveal animation ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-right { max-width: 480px; width: 100%; }
  .about-grid, .approach-grid { grid-template-columns: 1fr; gap: 56px; }
}
@media (max-width: 880px) {
  :root { --gutter: 22px; }
  .section { padding: 90px 0; }
  .hero { padding: 60px 0 50px; min-height: auto; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .footer-brand { justify-content: center; }
  .footer-meta { text-align: center; }
  .writing-row { grid-template-columns: 1fr; gap: 8px; }
  .writing-row .arrow { display: none; }
  .section-manifesto { padding: 90px 0; }
  .section-contact { padding: 90px 0; }
  .quick-facts > div { grid-template-columns: 1fr; gap: 4px; }
  .notfound-panel-body { padding: 28px 22px 32px; }
}
@media (max-width: 680px) {
  .primary-nav { display: none; }
  .primary-nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-elev);
    padding: 20px var(--gutter);
    border-bottom: 1px solid var(--line);
    gap: 6px;
    align-items: stretch;
  }
  .primary-nav.open a {
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--bg-card);
  }
  .nav-toggle { display: inline-flex; }
  .logo-role { display: none; }
  .hero-title { font-size: clamp(2.2rem, 9vw, 3.4rem); }
  .panel-row { grid-template-columns: 90px 1fr; gap: 10px; }
  .principles li { grid-template-columns: 40px 1fr; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; justify-content: center; }
  .notfound-cta .btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee { animation: none; }
  .kicker-pulse, .pulse { animation: none; }
  .writing-row:hover, .principles li:hover, .post-card:hover { transform: none; }
}
