/* ============================================================
   styles.css — the site's complete design system.

   One stylesheet, organized top to bottom roughly in the order the page is
   read: design tokens, then the shell (nav), the hero, the agent console, and
   finally the content sections. Colors are centralized as CSS custom properties
   in :root, so re-theming means editing one block.
   ============================================================ */

/* ============================================================
   Design tokens & base reset
   ============================================================ */
:root {
  --bg: #0c0c0c;
  --cell: #111;
  --ink: #f3f3f1;
  --mut: #9a9a96;
  --faint: #5f5f5b;
  --line: #2b2b2b;
  --bar: #3a3a3a;
  --accent: #d8fb50;
  --accent-2: #d8fb50;
  --cloud-q: #ff2d2d;
  --cloud-n: #ff6b6b
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Archivo", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased
}

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

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

.mono {
  font-family: "IBM Plex Mono", monospace
}

/* ============================================================
   Layout shell & top nav
   ============================================================ */
.frame {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 clamp(0px, 3vw, 40px)
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--bar);
  padding: 0 22px;
  height: 62px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 30
}

nav .brand {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -.02em;
  text-transform: uppercase
}

nav .links {
  display: flex
}

nav .links a {
  font-family: "IBM Plex Mono";
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mut);
  padding: 0 14px;
  border-left: 1px solid var(--line);
  height: 62px;
  display: flex;
  align-items: center
}

nav .links a:hover {
  background: var(--accent);
  color: #000
}

/* ============================================================
   Hero — name, chatbox, and the ambient caption (the #cloud canvas
   sits behind this, pinned top-right; .hcontent stacks above it)
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 22px;
  border-bottom: 2px solid var(--bar)
}

.hero #cloud {
  position: absolute;
  top: 0;
  right: 0;
  width: 80%;
  height: 100%;
  opacity: .68;
  pointer-events: none
}

.hero .hcontent {
  position: relative;
  z-index: 1
}

.herocap {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 1;
  max-width: 260px;
  text-align: right;
  font-family: "IBM Plex Mono";
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
  pointer-events: none
}

.herocap b {
  color: var(--accent);
  font-weight: 500
}

@media(max-width:900px) {
  .herocap {
    display: none
  }
}

.agentbar {
  margin-top: 30px;
  max-width: 680px
}

.agentbar .console {
  max-width: 680px
}

.tagbar {
  font-family: "IBM Plex Mono";
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent)
}

.hero h1 {
  font-weight: 900;
  font-size: clamp(3rem, 8.5vw, 6.4rem);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
  margin: 14px 0 0
}

.hero h1 .dim {
  -webkit-text-stroke: 1.5px var(--mut);
  color: transparent
}

.avatar {
  position: relative;
  width: 156px;
  height: 156px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  overflow: hidden;
  background: var(--cell);
  display: inline-flex;
  margin-bottom: 20px
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block
}

/* ============================================================
   Agent console — the chat UI: pipeline, transcript, chips, input
   ============================================================ */
.console {
  border: 2px solid var(--bar);
  background: var(--cell);
  width: 100%
}

.console-bar {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 2px solid var(--bar);
  font-family: "IBM Plex Mono";
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--mut)
}

.status {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--faint)
}

.status .pulse {
  width: 7px;
  height: 7px;
  background: var(--faint)
}

.status.busy .pulse {
  background: var(--accent)
}

.pipeline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 2px solid var(--bar)
}

.node {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Mono";
  font-size: 10px;
  text-transform: uppercase;
  color: var(--faint);
  padding: 3px 7px;
  border: 1px solid var(--line)
}

.node .led {
  width: 6px;
  height: 6px;
  background: var(--faint)
}

.node.active {
  color: #000;
  background: var(--accent);
  border-color: var(--accent)
}

.node.active .led {
  background: #000
}

.node.done {
  color: var(--mut)
}

.node.done .led {
  background: var(--accent)
}

.arrow {
  color: var(--faint)
}

.transcript {
  padding: 13px 12px;
  min-height: 120px;
  max-height: 230px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 13px
}

.msg .who {
  font-family: "IBM Plex Mono";
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  display: block;
  margin-bottom: 2px
}

.msg.user .who {
  color: var(--accent)
}

.msg.agent .who {
  color: var(--accent)
}

.msg.agent {
  color: var(--mut)
}

.retrieved {
  font-family: "IBM Plex Mono";
  font-size: 10px;
  color: var(--faint);
  display: flex;
  gap: 5px
}

.retrieved b {
  color: var(--ink);
  font-weight: 500
}

.caret::after {
  content: "\2588";
  color: var(--accent);
  animation: blink 1s steps(1) infinite
}

@keyframes blink {
  50% {
    opacity: 0
  }
}

.chipshint {
  border-top: 1px solid var(--line);
  padding: 11px 12px 0;
  font-family: "IBM Plex Mono";
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent)
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 12px 12px
}

.chip {
  font-family: "IBM Plex Mono";
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 500;
  color: var(--ink);
  background: rgba(216, 251, 80, .035);
  border: 1px solid var(--bar);
  padding: 7px 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s
}

.chip::before {
  content: "\203a ";
  color: var(--accent);
  font-weight: 700
}

.chip:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent)
}

.chip:hover::before {
  color: #000
}

.retrieved a.srclink {
  color: var(--accent);
  cursor: pointer;
  border-bottom: 1px dotted var(--accent)
}

.retrieved a.srclink:hover {
  color: var(--ink);
  border-bottom-color: var(--ink)
}

.followups {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px
}

.followup {
  font-family: "IBM Plex Mono";
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink);
  background: rgba(216, 251, 80, .025);
  border: 1px solid var(--bar);
  padding: 5px 8px;
  cursor: pointer
}

.followup::before {
  content: "\2192 ";
  color: var(--accent)
}

.followup:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent)
}

.followup:hover::before {
  color: #000
}

.inputrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px
}

.inputrow .prompt {
  color: var(--accent);
  font-family: "IBM Plex Mono";
  font-weight: 700
}

.inputrow input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--bar);
  outline: none;
  color: var(--ink);
  font-family: "IBM Plex Mono";
  font-size: 13px;
  padding: 9px 11px;
  transition: border-color .15s
}

.inputrow input:hover {
  border-color: var(--mut)
}

.inputrow input:focus {
  border-color: var(--accent)
}

.inputrow input::placeholder {
  color: var(--mut)
}

.inputrow button {
  background: var(--accent);
  color: #000;
  border: none;
  width: 34px;
  height: 34px;
  flex: none;
  cursor: pointer;
  font-weight: 700
}

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

/* ============================================================
   Content sections — shared scaffolding (section + numbered heading)
   ============================================================ */
.sec {
  border-bottom: 2px solid var(--bar)
}

.sechead {
  display: grid;
  grid-template-columns: 120px 1fr;
  border-bottom: 1px solid var(--line)
}

.sechead .num {
  font-family: "IBM Plex Mono";
  font-size: 12px;
  color: var(--accent);
  padding: 16px;
  border-right: 1px solid var(--line)
}

.sechead h2 {
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  text-transform: uppercase;
  letter-spacing: -.02em;
  margin: 0;
  padding: 14px 18px
}

.pad {
  padding: 26px 22px
}

.viewport {
  height: 260px;
  border: 2px solid var(--bar);
  position: relative;
  overflow: hidden;
  background: #080808
}

.viewport canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}

.viewport .bar2 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  font-family: "IBM Plex Mono";
  font-size: 10px;
  text-transform: uppercase;
  color: var(--faint);
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 8, .7)
}

.about-txt {
  font-size: 1.05rem;
  color: var(--mut);
  max-width: 60ch;
  margin-top: 24px
}

/* ============================================================
   Experience timeline
   ============================================================ */
.exp {
  display: grid;
  grid-template-columns: 1fr 1fr
}

.exp .c {
  padding: 24px 22px;
  border-right: 1px solid var(--line)
}

.exp .c:last-child {
  border-right: none
}

.exp .when {
  font-family: "IBM Plex Mono";
  font-size: 11px;
  text-transform: uppercase;
  color: var(--accent)
}

.exp h3 {
  font-weight: 900;
  font-size: 1.4rem;
  text-transform: uppercase;
  margin: 8px 0 2px;
  letter-spacing: -.01em
}

.exp .org {
  font-family: "IBM Plex Mono";
  font-size: 12px;
  color: var(--mut);
  margin-bottom: 12px
}

.exp .body {
  color: var(--mut);
  font-size: .95rem
}

.exp .tags {
  margin-top: 12px;
  font-family: "IBM Plex Mono";
  font-size: 10px;
  text-transform: uppercase;
  color: var(--faint)
}

/* ============================================================
   Projects, tech stack & skills (the 4-up card grid and friends)
   ============================================================ */
.grid4 {
  display: grid;
  grid-template-columns: 1fr 1fr
}

.grid4 .c {
  padding: 26px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line)
}

.grid4 .c:nth-child(2n) {
  border-right: none
}

.grid4 .n {
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--accent);
  line-height: 1
}

.grid4 .ty {
  font-family: "IBM Plex Mono";
  font-size: 10px;
  text-transform: uppercase;
  color: var(--faint);
  margin: 10px 0 4px
}

.pstatus {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-size: 9px;
  letter-spacing: .05em;
  color: var(--mut);
  border: 1px solid var(--line)
}

.pstatus.live {
  color: #000;
  background: var(--accent);
  border-color: var(--accent)
}

.grid4 h3 a.plink:hover {
  color: var(--accent)
}

.grid4 h3 a.plink .ext {
  font-size: .6em;
  font-weight: 500;
  color: var(--accent);
  vertical-align: super;
  margin-left: 3px
}

.grid4 h3 {
  font-weight: 900;
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0 0 8px;
  letter-spacing: -.01em
}

.grid4 p {
  color: var(--mut);
  font-size: .95rem;
  margin: 0 0 10px
}

.grid4 .ps {
  font-family: "IBM Plex Mono";
  font-size: 11px;
  color: var(--faint)
}

.themes-s div {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.05rem
}

.themes-s b {
  color: var(--accent);
  margin-right: 12px
}

.ph {
  padding: 16px 22px;
  font-family: "IBM Plex Mono";
  font-size: 12px;
  color: var(--faint)
}

.ph b {
  color: var(--mut)
}

.skills-s {
  display: grid;
  grid-template-columns: repeat(3, 1fr)
}

.skills-s .col {
  padding: 22px;
  border-right: 1px solid var(--line)
}

.skills-s .col:last-child {
  border-right: none
}

.skills-s h4 {
  font-family: "IBM Plex Mono";
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin: 0 0 12px
}

.skills-s li {
  list-style: none;
  color: var(--mut);
  font-size: .92rem;
  padding: 5px 0;
  border-top: 1px solid var(--line)
}

.skills-s ul {
  margin: 0;
  padding: 0
}

.links {
  display: flex;
  flex-wrap: wrap
}

.links a {
  font-family: "IBM Plex Mono";
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 16px 22px;
  border-right: 1px solid var(--line)
}

.links a:hover {
  background: var(--accent);
  color: #000
}

/* ============================================================
   Footer & responsive overrides (media queries follow)
   ============================================================ */
footer {
  padding: 20px 22px;
  font-family: "IBM Plex Mono";
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px
}

@media(max-width:820px) {

  .hero,
  .exp,
  .grid4,
  .skills-s {
    grid-template-columns: 1fr
  }

  .hero .l {
    border-right: none;
    border-bottom: 2px solid var(--bar)
  }

  .exp .c,
  .grid4 .c {
    border-right: none
  }

  .skills-s .col {
    border-right: none;
    border-bottom: 1px solid var(--line)
  }

  nav .links a {
    padding: 0 9px
  }

  .sechead {
    grid-template-columns: 60px 1fr
  }
}

@media(max-width:560px) {
  nav {
    padding: 0 14px;
    gap: 10px
  }

  nav .brand {
    font-size: 16px;
    flex: none
  }

  nav .links {
    overflow-x: auto;
    min-width: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent)
  }

  nav .links::-webkit-scrollbar {
    display: none
  }

  nav .links a {
    font-size: 11px;
    letter-spacing: .03em;
    padding: 0 11px;
    flex: none;
    white-space: nowrap
  }
}

/* ============================================================
   Publications list
   ============================================================ */
.writing .w {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line)
}

.writing .w:hover {
  background: var(--cell)
}

.writing .wt {
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -.01em
}

.writing .wd {
  color: var(--mut);
  font-size: .92rem;
  margin-top: 5px;
  font-weight: 400
}

.writing .ws {
  font-family: "IBM Plex Mono";
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  white-space: nowrap
}

/* ============================================================
   Now section
   ============================================================ */
.now .row2 {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line)
}

.now .lbl2 {
  font-family: "IBM Plex Mono";
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent)
}

.now .txt2 {
  color: var(--ink)
}

.wintro,
.nowintro {
  padding: 15px 22px;
  color: var(--mut);
  font-size: .95rem;
  border-bottom: 1px solid var(--line)
}

@media(max-width:820px) {
  .now .row2 {
    grid-template-columns: 1fr;
    gap: 3px
  }

  .writing .w {
    grid-template-columns: 1fr
  }
}

.exp-grouphead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  font-family: "IBM Plex Mono";
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--line)
}

.exp-grouphead .gdot {
  width: 9px;
  height: 9px;
  background: var(--accent)
}

.exp-group+.exp-group {
  border-top: 1px solid var(--bar)
}

.xrow {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 22px;
  padding: 22px;
  border-bottom: 1px solid var(--line)
}

.xrow:last-child {
  border-bottom: none
}

.xperiod {
  font-family: "IBM Plex Mono";
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--accent);
  line-height: 1.5
}

.xperiod .place {
  display: block;
  color: var(--faint);
  margin-top: 4px
}

.xmain {
  border-left: 2px solid var(--accent);
  padding-left: 18px
}

.xrole {
  font-weight: 900;
  font-size: 1.22rem;
  text-transform: uppercase;
  letter-spacing: -.01em
}

.xorg {
  font-family: "IBM Plex Mono";
  font-size: 12px;
  color: var(--mut);
  margin-top: 3px
}

.xpoints {
  margin: 12px 0 0;
  padding: 0;
  list-style: none
}

.xpoints li {
  position: relative;
  color: var(--mut);
  font-size: .95rem;
  padding: 4px 0 4px 16px
}

.xpoints li::before {
  content: "\25B8";
  position: absolute;
  left: 0;
  color: var(--accent)
}

.xnote {
  margin-top: 8px;
  font-family: "IBM Plex Mono";
  font-size: 11px;
  color: var(--faint)
}

.xnote b {
  color: var(--accent);
  font-weight: 500
}

.xtags {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px
}

.xtags span {
  font-family: "IBM Plex Mono";
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--faint);
  border: 1px solid var(--line);
  padding: 3px 7px
}

@media(max-width:640px) {
  .xrow {
    grid-template-columns: 1fr;
    gap: 12px
  }
}
