@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0a0b;
  --panel: #0f1012;
  --fg: #ededec;
  --dim: #8a8a88;
  --faint: #3a3a3b;
  --rule: #1a1b1d;
  --accent: #a4fc6f;     /* lime green */
  --accent2: #5eead4;    /* teal */
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "EB Garamond", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font-family: var(--sans);
  font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--faint); transition: border-color .15s, color .15s; }
a:hover { color: var(--accent); border-bottom-color: var(--accent); }
p { color: var(--fg); }
::selection { background: var(--accent); color: #000; }

/* ------------ nav ------------ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 18px 32px;
  font-family: var(--mono); font-size: 12.5px;
  backdrop-filter: blur(14px);
  background: rgba(10,10,11,0.55);
  border-bottom: 1px solid var(--rule);
}
.nav .brand { font-weight: 600; letter-spacing: -0.2px; color: var(--fg); display: flex; align-items: center; gap: 10px; border: 0; }
.nav .brand a { color: var(--fg); border: 0; }
.nav .brand a:hover { color: var(--accent); }
.nav .brand .dot {
  position: relative; overflow: hidden;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  cursor: pointer; flex-shrink: 0;
}
.nav .brand .dot input[type="color"] {
  opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%;
  cursor: pointer; border: 0; padding: 0;
}
.nav .spacer { flex: 1; }
.nav a { color: var(--dim); border: 0; }
.nav a:hover { color: var(--fg); }
.nav a.active { color: var(--fg); }
.nav .cta {
  padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px;
  color: var(--fg); background: rgba(255,255,255,0.02);
}
.nav .cta:hover { background: var(--accent); color: #000; border-color: var(--accent); }

/* ------------ hero ------------ */
.hero {
  position: relative;
  height: 90vh;
  padding: 140px 32px 90px;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.hero canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
  /* subtle vignette via mask */
  mask-image: radial-gradient(ellipse 120% 90% at 50% 40%, #000 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 40%, #000 50%, transparent 100%);
}
.hero::before {
  /* darkening scrim so text on top of the animation stays readable */
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(10,10,11,0.72) 0%, rgba(10,10,11,0.45) 55%, transparent 100%);
  pointer-events: none;
}
.hero .inner {
  position: relative; z-index: 2;
  max-width: 940px; margin: 0 auto;
}
.hero h1, .hero .sub, .hero .kicker {
  text-shadow: 0 1px 14px rgba(0,0,0,0.7);
}
.hero h1 {
  font-family: var(--sans);
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 500;
  letter-spacing: -2.2px;
  line-height: 1.02;
  margin: 0 0 24px;
}
.hero h1 .mark {
  display: inline-block;
  color: var(--accent);
  font-style: normal;
}
.hero p.kicker {
  font-family: var(--mono); font-size: 12.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 20px;
  display: inline-flex; align-items: center; gap: 10px;
}
.hero p.kicker::before {
  content: ""; width: 24px; height: 1px; background: var(--accent);
}
.hero .sub {
  max-width: 640px; color: var(--fg); font-size: 19px; line-height: 1.6; margin: 0 0 32px;
}
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .ctas a {
  padding: 11px 20px; border-radius: 999px;
  font-family: var(--mono); font-size: 12.5px;
  border: 1px solid var(--rule);
  background: rgba(255,255,255,0.02);
  color: var(--fg);
}
.hero .ctas a.primary { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.hero .ctas a.primary:hover { background: #000; color: var(--accent); border-color: var(--accent); }
.hero .ctas a.secondary { background: #000; color: var(--accent); border-color: var(--accent); font-weight: 600; }
.hero .ctas a.secondary:hover { background: var(--accent); color: #000; border-color: var(--accent); }
.hero .ctas a:not(.primary):not(.secondary):hover { border-color: var(--fg); color: var(--fg); }

.hero .chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 56px;
  font-family: var(--mono); font-size: 11.5px; color: #fff;
}
.hero .chips .chip {
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(10,10,11,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ------------ sections ------------ */
section.content {
  max-width: 940px; margin: 0 auto;
  padding: 96px 32px;
  border-bottom: 1px solid var(--rule);
}
section.content:last-of-type { border-bottom: 0; }
.writing-shell {
  position: relative;
  min-height: calc(100vh - 96px);
  overflow: hidden;
}
.writing-hero {
  position: relative;
  z-index: 2;
}
.page-ascii {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.36;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 40%, #000 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 40%, #000 45%, transparent 100%);
}
.writing-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 85% 70% at 50% 40%, rgba(10,10,11,0.58) 0%, rgba(10,10,11,0.84) 64%, var(--bg) 100%);
  pointer-events: none;
}
.eyebrow {
  font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
h2.big {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(30px, 4vw, 44px); letter-spacing: -1.2px; line-height: 1.1;
  margin: 0 0 18px; color: var(--fg);
}
h2.big .light { color: var(--dim); }
p.lead { font-size: 19px; color: var(--fg); max-width: 60ch; margin: 0 0 12px; }

/* --- now card --- */
.now-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px;
}
.now-card {
  border: 1px solid var(--rule); border-radius: 10px; padding: 20px 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 4%, transparent), transparent);
  position: relative;
}
.now-card .k { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
.now-card .v { font-size: 17px; color: var(--fg); line-height: 1.55; }
.now-card .v em { color: var(--accent2); font-style: normal; }
.now-card::after {
  content: ""; position: absolute; top: 14px; right: 14px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- publications --- */
.pubs { margin-top: 28px; }
.pub {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 22px;
  padding: 22px 0; border-top: 1px solid var(--rule);
  align-items: baseline;
}
.pub:last-child { border-bottom: 1px solid var(--rule); }
.pub .yr { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.pub .title { font-size: 19px; font-weight: 500; color: var(--fg); margin: 0 0 6px; line-height: 1.35; letter-spacing: -0.3px; }
.pub .meta { font-family: var(--mono); font-size: 13.5px; color: var(--dim); }
.pub .meta .venue { color: var(--accent); }
.pub .arrow { color: var(--dim); font-family: var(--mono); font-size: 14px; transition: transform .15s, color .15s; }
.pub:hover { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 4%, transparent), transparent); cursor: pointer; }
.pub:hover .arrow { color: var(--accent); transform: translateX(4px); }
.pub:hover .title { color: var(--accent); }

/* --- essays grid --- */
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.post {
  border: 1px solid var(--rule); border-radius: 10px;
  padding: 18px 20px;
  background: var(--panel);
  display: block; border-bottom: 1px solid var(--rule);
  transition: border-color .15s, transform .15s;
}
.post:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--fg); }
.post .d { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-bottom: 8px; display: flex; justify-content: space-between; }
.post .t { font-size: 22px; line-height: 1.2; color: var(--fg); font-weight: 500; letter-spacing: -0.2px; }
.post .blurb { font-size: 16px; line-height: 1.45; color: var(--fg); margin: 10px 0 0; opacity: 0.82; }
.post-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 32px;
  text-align: left;
}
.post-page h1 {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -1.2px;
  line-height: 1.05;
  margin: 0 0 12px;
}
.post-page p {
  font-size: 20px;
  line-height: 1.65;
  margin: 22px 0 0;
}
.post-meta,
.backlink {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}
.backlink {
  display: inline-block;
  margin-bottom: 32px;
  border: 0;
}
.backlink:hover {
  color: var(--accent);
}

/* --- contact row --- */
.contact {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-top: 28px;
}
.contact a {
  border: 1px solid var(--rule); border-radius: 10px;
  padding: 18px 18px; background: var(--panel);
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 13px;
  color: var(--fg);
  transition: border-color .15s, background .15s;
}
.contact a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.contact a .k { font-size: 11px; color: var(--dim); letter-spacing: 0.14em; text-transform: uppercase; }
.contact a .v { font-size: 15.5px; color: var(--fg); }


/* footer */
footer.bottom {
  padding: 40px 32px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11.5px; color: var(--dim);
  display: flex; justify-content: space-between; max-width: 940px; margin: 0 auto;
}
footer.bottom .stat { color: var(--accent); }

@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 14px 18px;
  }
  .nav .brand {
    flex: 1 1 100%;
  }
  .nav .spacer {
    display: none;
  }
  .nav a {
    flex: 0 0 auto;
  }
  .hero {
    height: auto;
    min-height: 100svh;
    padding: 132px 20px 52px;
  }
  .hero h1 {
    font-size: clamp(40px, 13vw, 56px);
    letter-spacing: -1.4px;
  }
  .hero .sub {
    font-size: 17px;
    line-height: 1.52;
  }
  .hero .chips {
    margin-top: 36px;
  }
  section.content {
    padding: 132px 20px 72px;
  }
  .now-grid, .posts { grid-template-columns: 1fr; }
  .contact { grid-template-columns: repeat(2, 1fr); }
  .pub { grid-template-columns: 48px 1fr; }
  .pub .arrow { display: none; }
}
