:root {
  --jade: #373C2B;
  --jade-deep: #262a1e;
  --jade-ink: #1a1d14;
  --jasper: #DAFF00;
  --jasper-dim: #b8d600;
  --paper: #F5F2EA;
  --paper-warm: #EDE8DA;
  --line: rgba(55, 60, 43, 0.18);
  --line-soft: rgba(55, 60, 43, 0.08);
  --muted: rgba(55, 60, 43, 0.62);
  --muted-strong: rgba(55, 60, 43, 0.80);
  --amber: #d4892b;
}

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

html, body {
  background: var(--paper);
  color: var(--jade);
  font-family: 'Inter Tight', system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

body {
  background-image: radial-gradient(ellipse 900px 460px at 8% 0%, rgba(218, 255, 0, 0.06), transparent 60%);
  min-height: 100vh;
  padding: clamp(20px, 4vw, 56px);
  overflow-x: hidden;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
}

a {
  color: var(--jade-ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
a:hover { text-decoration-color: var(--jade); }

/* ── Eyebrow ─────────────────────────────────────────── */

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  background: var(--jade);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Masthead ────────────────────────────────────────── */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
  gap: 32px;
  flex-wrap: wrap;
}
.masthead-left { flex: 1 1 480px; }
.masthead h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.015em;
  line-height: 1.04;
  color: var(--jade-ink);
  margin-top: 12px;
  max-width: 18ch;
}
.masthead h1 em {
  font-style: italic;
  color: var(--muted-strong);
}

.meta-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  text-align: right;
  padding-top: 8px;
  flex: 0 0 auto;
}
.meta-block strong {
  color: var(--jade);
  font-weight: 500;
  display: inline-block;
  width: 56px;
  text-align: left;
}
.meta-block a {
  color: var(--jade);
  text-decoration-color: var(--line);
}

/* ── Intro ───────────────────────────────────────────── */

.intro {
  margin-bottom: 88px;
  max-width: 720px;
}
.lede {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.45;
  color: var(--jade-ink);
  margin-bottom: 18px;
}
.lede-sub {
  font-size: 15px;
  color: var(--muted-strong);
  line-height: 1.6;
}

/* ── Section ─────────────────────────────────────────── */

.section {
  margin-bottom: 96px;
}
.section-head {
  margin-bottom: 36px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.section-head h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--jade-ink);
  margin-top: 14px;
  max-width: 32ch;
}
.section-head h2 em {
  font-style: italic;
  color: var(--muted-strong);
}
.section-note {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 14px;
  max-width: 56ch;
  line-height: 1.6;
  font-style: italic;
  font-family: 'Instrument Serif', serif;
}

/* ── Projects ────────────────────────────────────────── */

.projects {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.project {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  padding: 36px 0;
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.project:first-child {
  border-top: none;
  padding-top: 0;
}
.project-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-top: 6px;
}
.project-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.project h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--jade-ink);
  margin-bottom: 14px;
}
.project-desc {
  font-size: 15.5px;
  color: var(--muted-strong);
  line-height: 1.65;
  margin-bottom: 18px;
  max-width: 64ch;
}
.project-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 22px;
}
.project-meta li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--paper-warm);
  border: 1px solid var(--line-soft);
  padding: 4px 9px;
  border-radius: 999px;
}

/* hero project: jasper accent on the number */
.project.hero .project-num {
  color: var(--jade-ink);
  font-weight: 500;
}
.project.hero .project-num::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--jade-ink);
  margin-top: 8px;
}

/* pending project: visibly de-emphasised */
.project.pending {
  opacity: 0.72;
}
.project.pending h3,
.project.pending .project-num {
  color: var(--muted-strong);
}

/* ── Buttons ─────────────────────────────────────────── */

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--jade-ink);
  color: var(--paper);
  border-color: var(--jade-ink);
}
.btn-primary:hover {
  background: var(--jade-deep);
  text-decoration: none;
}
.btn-secondary {
  background: transparent;
  color: var(--jade);
  border-color: var(--line);
}
.btn-secondary:hover {
  border-color: var(--jade);
  text-decoration: none;
}
.btn-disabled {
  background: transparent;
  color: var(--muted);
  border-color: var(--line-soft);
  cursor: not-allowed;
  user-select: none;
  opacity: 0.85;
}

/* ── Writing ─────────────────────────────────────────── */

.writing {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-soft);
}
.article {
  padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
  padding-right: 24px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-num {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.article-flag {
  color: var(--amber);
  border-left: 1px solid var(--line);
  padding-left: 10px;
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 10.5px;
}
.article h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin-bottom: 10px;
  max-width: 28ch;
}
.article h3 a {
  color: var(--jade-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s ease;
}
.article h3 a:hover {
  border-bottom-color: var(--jade);
}
.article-teaser {
  font-size: 14.5px;
  color: var(--muted-strong);
  line-height: 1.6;
  max-width: 44ch;
}
.article-teaser em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  color: var(--jade-ink);
}

/* ── Credentials ─────────────────────────────────────── */

.credentials .section-head { margin-bottom: 24px; }
.cert-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.cert {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-warm);
  min-width: 220px;
}
.cert-issuer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.cert-name {
  font-family: 'Instrument Serif', serif;
  font-size: 17px;
  color: var(--jade-ink);
  line-height: 1.2;
}
.cert-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

/* ── Footer ──────────────────────────────────────────── */

.site-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-left { max-width: 540px; }
.footer-line {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  line-height: 1.4;
  color: var(--jade-ink);
  margin-top: 12px;
  margin-bottom: 14px;
}
.footer-line a { color: var(--jade-ink); }
.footer-note {
  font-size: 13.5px;
  color: var(--muted-strong);
  line-height: 1.55;
}
.footer-stamp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 720px) {
  .masthead {
    flex-direction: column;
    gap: 18px;
  }
  .meta-block {
    text-align: left;
  }
  .meta-block strong { width: auto; margin-right: 8px; }

  .project {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .project-num {
    font-size: 11px;
    padding-top: 0;
  }
  .project.hero .project-num::after { display: none; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
