/* Everforest (dark, hard) + JetBrains Mono */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #272e33;
  --surface: #2e383c;
  --line: rgba(211, 198, 170, 0.14);
  --fg: #d3c6aa;
  --dim: #9da9a0;
  --faint: #7a8478;
  --accent: #a7c080;
  --wip: #dbbc7f;
  --blue: #7fbbb3;
  --red: #e67e80;
  --ink: #4a5550;
  --font: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 10;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--bg);
}
.skip:focus { top: 8px; }

/* ── top bar ─────────────────────────────────────────────── */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(39, 46, 51, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.bar__home {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.bar nav { display: flex; gap: 24px; }
.bar nav a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s;
}
.bar nav a:hover { color: var(--fg); }

/* ── hero ────────────────────────────────────────────────── */
.hero { padding: 96px 0 24px; }

.prompt {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
}
.prompt--sm { font-size: 13px; margin-bottom: 16px; }
.prompt__user { color: var(--accent); }
.prompt__path { color: var(--blue); }

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  margin-left: 0.35em;
  vertical-align: -0.2em;
  background: var(--fg);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__name {
  margin: 32px 0 24px;
  font-size: clamp(3.5rem, 14vw, 8.5rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.hero__name .dot { color: var(--accent); }

.hero__role {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.375rem);
  line-height: 1.4;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 40px 0 0;
  font-size: 14px;
}
.hero__cta a {
  padding: 10px 16px;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.hero__cta a:first-child { border-color: var(--accent); color: var(--accent); }
.hero__cta a:hover { border-color: var(--accent); color: var(--accent); }

.arrow {
  display: inline-block;
  color: var(--dim);
  transition: transform 0.15s, color 0.15s;
}
a:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }
.hero__cta a:first-child .arrow { color: inherit; }

/* ── sections ────────────────────────────────────────────── */
.section { padding-top: 88px; }

.section__h {
  display: flex;
  align-items: center;
  margin: 0 0 32px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section__h::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 16px;
  background: var(--line);
}
.hex { color: var(--dim); font-weight: 400; text-transform: none; }

/* about */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}
.about__bio > p { margin: 0 0 16px; max-width: 60ch; }
.about__bio a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.about__bio a:hover { text-decoration: underline; }

.now {
  margin-top: 28px;
  padding: 14px 18px 16px;
  border-left: 2px solid var(--accent);
  background: var(--surface);
}
.now .prompt { margin-bottom: 6px; }
.now__text { margin: 0; max-width: 60ch; font-size: 14px; }

.card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
}
.card div {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.card div:last-child { border-bottom: 0; }
.card dt {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.9;
}
.card dd {
  margin: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  vertical-align: 0.1em;
  border-radius: 50%;
  background: var(--wip);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(219, 188, 127, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(219, 188, 127, 0); }
}

/* projects: an `ls -l` listing */
.ls {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.proj {
  display: grid;
  grid-template-columns: 10ch 4ch 11ch minmax(0, 1fr) auto;
  grid-template-areas:
    "perm year name desc status"
    ".    .    .    meta meta";
  column-gap: 24px;
  row-gap: 10px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.proj__perm { grid-area: perm; color: var(--dim); }
.proj__year { grid-area: year; color: var(--dim); font-variant-numeric: tabular-nums; }
.proj__name { grid-area: name; margin: 0; font-size: 15px; font-weight: 700; }
.proj__desc { grid-area: desc; min-width: 0; }
.proj__status {
  grid-area: status;
  justify-self: end;
  color: var(--wip);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.proj .pulse { animation: none; }
.proj[data-status="live"] .proj__status { color: var(--accent); }
.proj[data-status="live"] .pulse { background: var(--accent); }
.proj__meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 12px;
}
.proj__meta > span { display: inline-flex; align-items: center; gap: 10px; }
.proj__meta .key { color: var(--dim); }
.proj__meta a { color: var(--blue); text-decoration: none; }
.proj__meta a:hover { text-decoration: underline; }

.note {
  margin: 16px 0 0;
  color: var(--dim);
  font-size: 12px;
}

/* redaction bar: hover / focus / tap to "declassify" */
.redact {
  position: relative;
  display: inline-block;
  width: var(--w, 12ch);
  max-width: 100%;
  height: 1.4em;
  padding: 0;
  border: 0;
  background: none;
  color: var(--wip);
  font: inherit;
  vertical-align: middle;
  cursor: pointer;
}
.redact__bar {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 5px, rgba(211, 198, 170, 0.05) 5px 6px),
    var(--ink);
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.redact__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
}
.redact.is-open .redact__bar { clip-path: inset(0 0 0 100%); }
.redact.is-open .redact__text { opacity: 1; }
.redact.is-glitch .redact__text { opacity: 0.7; color: var(--fg); transition: none; }

/* experience: a `git log --graph` */
.log { list-style: none; margin: 0; padding: 0; }
.commit { position: relative; padding-left: 48px; }
.commit::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(211, 198, 170, 0.22);
}
.commit.is-head::before { top: 22px; }
.commit.is-root::before { bottom: auto; height: 22px; }
.commit.is-gap::before {
  background: repeating-linear-gradient(to bottom, rgba(211, 198, 170, 0.22) 0 4px, transparent 4px 9px);
}
.commit__node {
  position: absolute;
  left: 3px;
  top: 16px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--dim);
  border-radius: 50%;
  background: var(--bg);
}
.is-head .commit__node { border-color: var(--accent); background: var(--accent); }
.is-gap .commit__node { border-style: dashed; border-color: var(--faint); }
/* side project: drawn as a branch that leaves main and merges back */
.commit.is-side::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  bottom: 4px;
  width: 20px;
  border: 2px solid var(--blue);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  opacity: 0.6;
}
.is-side .commit__node { left: 22px; z-index: 1; border-color: var(--blue); }

.commit summary,
.commit__static {
  display: grid;
  gap: 2px;
  padding: 12px 0 14px;
}
.commit summary { cursor: pointer; list-style: none; }
.commit summary::-webkit-details-marker { display: none; }
.commit summary:hover strong { color: var(--accent); }

.commit__top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--dim);
  font-size: 12px;
}
.commit__hash { color: var(--wip); }
.commit__refs { color: var(--accent); }
.is-side .commit__refs { color: var(--blue); }
.commit__years { margin-left: auto; font-variant-numeric: tabular-nums; }
.commit summary .commit__top::after,
.commit__static .commit__top::after { content: "[+]"; }
.commit__static .commit__top::after { visibility: hidden; }
.commit details[open] summary .commit__top::after { content: "[−]"; color: var(--accent); }
.commit__title { font-size: 15px; }
.commit__title strong { font-weight: 700; transition: color 0.15s; }
.commit__headline { color: var(--dim); font-size: 14px; }
.is-gap .commit__title { color: var(--dim); }

.commit__body { padding: 0 0 20px; font-size: 14px; }
.commit__about { margin: 0 0 8px; max-width: 70ch; }
.commit__body ul { margin: 0 0 10px; padding: 0; list-style: none; max-width: 70ch; }
.commit__body li { position: relative; padding-left: 2ch; }
.commit__body li::before { content: "-"; position: absolute; left: 0; color: var(--dim); }
.commit__hats { margin: 0; color: var(--blue); font-size: 12px; white-space: pre-wrap; }

/* stack */
.stack { margin: 0; border-top: 1px solid var(--line); }
.stack__row {
  display: grid;
  grid-template-columns: 10ch minmax(0, 1fr);
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.stack dt { color: var(--blue); }
.stack dd { margin: 0; }
.stack__item { white-space: nowrap; }
.stack__aside { color: var(--dim); }
.stack__sep { color: var(--faint); }

/* cv: a classified file + request form */
.cv {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.doc { background: var(--surface); border: 1px solid var(--line); }
.doc__head {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.doc__meta { color: var(--dim); white-space: nowrap; }
.doc__body { position: relative; display: grid; gap: 10px; padding: 24px 20px 32px; }
.doc__line {
  display: block;
  width: var(--w);
  height: 10px;
  background:
    repeating-linear-gradient(135deg, transparent 0 5px, rgba(211, 198, 170, 0.05) 5px 6px),
    var(--ink);
  transition: opacity 0.6s;
}
.doc__line--thin { height: 6px; }
.w40 { --w: 40%; } .w55 { --w: 55%; } .w64 { --w: 64%; } .w72 { --w: 72%; } .w80 { --w: 80%; }
.w86 { --w: 86%; } .w88 { --w: 88%; } .w92 { --w: 92%; } .w95 { --w: 95%; }
.doc__gap { height: 6px; }
.stamp {
  position: absolute;
  right: 16px;
  bottom: 22px;
  padding: 4px 10px;
  border: 2px solid var(--red);
  background: rgba(46, 56, 60, 0.9);
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-8deg);
  transition: color 0.3s, border-color 0.3s;
}
.doc.is-open .doc__line { opacity: 0.3; }
.doc.is-open .stamp { border-color: var(--accent); color: var(--accent); }

.term { margin: 0; }
.term .prompt { margin-bottom: 8px; }
.term__field {
  display: grid;
  grid-template-columns: 9ch minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.term__field > span { color: var(--dim); transition: color 0.15s; }
.term__field input {
  width: 100%;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  caret-color: var(--accent);
}
.term__field input::placeholder { color: var(--faint); }
.term__field:focus-within { border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.term__field:focus-within > span { color: var(--accent); }
.term__field:has([aria-invalid="true"]) { border-bottom-color: var(--red); box-shadow: 0 1px 0 var(--red); }
.term__btn {
  margin-top: 24px;
  padding: 12px 18px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.term__btn:hover:not(:disabled) { background: var(--accent); color: var(--bg); }
.term__btn:disabled { cursor: default; opacity: 0.75; }
.term__log { margin-top: 16px; font-size: 13px; }
.term__log:empty { display: none; }
.log__line { margin: 0; color: var(--dim); white-space: pre-wrap; }
.is-ok { color: var(--accent); }
.is-fail { color: var(--red); }
.term__log a { color: var(--blue); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* links */
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }

.row-link {
  display: grid;
  grid-template-columns: 12ch minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 14px;
}
.row-link__label {
  color: var(--dim);
  font-size: 13px;
  text-transform: lowercase;
}
.row-link__value { overflow-wrap: anywhere; transition: color 0.15s; }
.row-link:hover .row-link__value { color: var(--accent); }

/* footer */
.footer {
  margin-top: 120px;
  padding-top: 32px;
  padding-bottom: 48px;
  color: var(--dim);
  font-size: 12px;
}
.footer p { margin: 0; }
.heart { color: var(--red); }
.eof {
  margin-bottom: 8px !important;
  font-weight: 700;
  letter-spacing: 0.2em;
}

/* ── small screens ───────────────────────────────────────── */
@media (max-width: 760px) {
  .about, .cv { grid-template-columns: 1fr; gap: 32px; }
  .cv .doc { max-width: 340px; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .bar nav { gap: 12px; font-size: 12px; }
  .hero { padding-top: 64px; }
  .section { padding-top: 72px; }
  .card div { grid-template-columns: 96px 1fr; }

  .proj {
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "perm year status"
      "name name name"
      "desc desc desc"
      "meta meta meta";
    column-gap: 16px;
    row-gap: 8px;
  }
  .proj__name { font-size: 17px; margin-top: 4px; }

  .row-link { grid-template-columns: 10ch minmax(0, 1fr) auto; gap: 16px; font-size: 13px; }
  .stack__row { grid-template-columns: 1fr; gap: 4px; }
  .commit { padding-left: 40px; }
}

@media (max-width: 380px) {
  .bar__home { display: none; }
  .bar__inner { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .pulse { animation: none; }
  .redact__bar, .redact__text, .doc__line, .stamp { transition: none; }
}
