/* arash.nyc — design system v1
   palette: bone paper, ink, sodium-lamp signal
   type: instrument serif (display), jetbrains mono (data), inter tight (chrome)
*/

:root {
  /* ink */
  --ink:        #0e0e0e;
  --ink-2:      #1a1a1a;
  --ink-3:      #2a2826;
  --ink-mute:   #5a564f;
  --ink-line:   #1f1d1a;

  /* paper */
  --paper:      #f4efe6;
  --paper-2:    #ece5d6;
  --paper-3:    #ddd4c0;
  --paper-line: #c9bfa6;

  /* signal */
  --signal:     #ff5a1f;        /* sodium-lamp orange */
  --signal-ink: #c8410f;
  --live:       #18a957;        /* terminal green for "running" */
  --warn:       #f0c419;

  /* type */
  --serif: "Instrument Serif", "GT Sectra", "Source Serif 4", Georgia, serif;
  --mono:  "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:  "Inter Tight", "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif;

  /* scale (desktop) */
  --t-mega:    clamp(72px, 12.5vw, 220px);
  --t-h1:      clamp(48px, 6vw, 96px);
  --t-h2:      clamp(36px, 4vw, 64px);
  --t-h3:      clamp(24px, 2vw, 32px);
  --t-eyebrow: 12px;
  --t-body:    17px;
  --t-body-lg: 20px;
  --t-meta:    13px;
  --t-micro:   11px;

  /* spacing */
  --gutter: clamp(20px, 4vw, 56px);
  --rule: 1px solid var(--ink-line);
  --rule-paper: 1px solid var(--paper-line);
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--signal); color: var(--paper); }

/* type utilities */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 0.95; }
.mono  { font-family: var(--mono); font-weight: 400; letter-spacing: 0; }
.sans  { font-family: var(--sans); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--t-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}

.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--signal);
  margin-right: 8px;
  vertical-align: 1px;
}

.signal { color: var(--signal); }
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(24,169,87,0.7);
  animation: pulse 1.6s ease-out infinite;
  vertical-align: 1px;
  margin-right: 8px;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(24,169,87,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(24,169,87,0);  }
  100% { box-shadow: 0 0 0 0 rgba(24,169,87,0);    }
}

/* layout primitives */
.page {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rule       { border-top: var(--rule); }
.rule-paper { border-top: var(--rule-paper); }

.section { padding: clamp(64px, 8vw, 128px) 0; position: relative; }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--gutter);
  align-items: end;
  padding-top: 24px;
  margin-bottom: clamp(32px, 4vw, 64px);
}
.section-head .num { font-family: var(--mono); font-size: var(--t-meta); color: var(--ink-mute); }
.section-head h2 {
  font-family: var(--serif);
  font-size: var(--t-h2);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.section-head h2 em { font-style: italic; color: var(--signal); }

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

/* nav */
.topnav {
  position: sticky;
  top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: var(--rule-paper);
}
.topnav .row {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.topnav .brand {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 10px;
}
.topnav .brand b { font-weight: 600; }
.topnav nav {
  display: flex; gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.topnav nav a { color: var(--ink-mute); }
.topnav nav a:hover { color: var(--ink); }
.topnav .now {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  display: flex; align-items: center; gap: 6px;
}
@media (max-width: 760px) {
  .topnav nav { display: none; }
}

/* button */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.signal { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.btn.signal:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* small chip */
.chip {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border: 1px solid var(--ink-line);
  color: var(--ink-mute);
}
.chip.signal { color: var(--signal); border-color: var(--signal); }
.chip.live   { color: var(--live);   border-color: var(--live); }

/* link arrow */
.larrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.larrow:hover { color: var(--signal); border-color: var(--signal); }

/* hide scrollbars on tickers */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Sentence-case headline override: do not lowercase serif headlines */
.serif, .name, h1, h2, h3, h4, h5 { text-transform: none; }
/* arash.nyc — ops console hero
   the one big idea: a real-time worklog of agents shipping in parallel,
   with the masthead on the left. reads like a trading terminal, not a portfolio.
*/

/* ---------- masthead ---------- */
.hero {
  position: relative;
  border-bottom: var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  min-height: calc(100vh - 56px);
}
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
}

.masthead {
  padding: clamp(28px, 4vw, 64px) clamp(20px, 3vw, 56px) clamp(40px, 5vw, 80px);
  display: flex; flex-direction: column; justify-content: space-between;
  border-right: var(--rule-paper);
  position: relative;
}
.masthead .head-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
.masthead .portrait {
  width: clamp(96px, 11vw, 156px);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--ink-line);
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}
.masthead .portrait image-slot {
  width: 100%; height: 100%; display: block;
}
.masthead .portrait .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 4px 6px;
  display: flex; justify-content: space-between;
  pointer-events: none;
}
@media (max-width: 1000px) {
  .masthead { border-right: none; border-bottom: var(--rule-paper); }
}

.masthead .top { display: flex; flex-direction: column; gap: 18px; }

.masthead .name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 10.5vw, 180px);
  line-height: 0.84;
  letter-spacing: -0.035em;
}
.masthead .name .a { display: block; }
.masthead .name .b { display: block; padding-left: 0.4em; font-style: italic; }
.masthead .name .b .amp { color: var(--signal); font-style: normal; }

.masthead .tagline {
  margin-top: clamp(28px, 4vw, 56px);
  max-width: 540px;
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}
.masthead .tagline em { color: var(--signal); font-style: italic; }

.masthead .roles {
  display: flex; flex-wrap: wrap; gap: 0;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.masthead .roles span { padding-right: 14px; }
.masthead .roles span + span { padding-left: 14px; border-left: 1px solid var(--paper-line); }

.masthead .ctas {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: clamp(36px, 5vw, 64px);
}

.masthead .meta-row {
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-top: 24px;
  border-top: var(--rule-paper);
  margin-top: clamp(28px, 4vw, 48px);
}

/* ---------- ops console ---------- */
.console {
  background: var(--ink);
  color: var(--paper);
  display: grid;
  grid-template-rows: auto 1fr auto;
  font-family: var(--mono);
  position: relative;
  overflow: hidden;
}
.console .titlebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #232220;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a09a8e;
}
.console .titlebar .left { display: flex; align-items: center; gap: 10px; }
.console .titlebar .right { display: flex; align-items: center; gap: 14px; }
.console .titlebar .right .ts { color: #6e6a62; }

.console .body {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
}
@media (max-width: 600px) { .console .body { grid-template-columns: 1fr; } }

/* left rail: agent roster */
.roster {
  border-right: 1px solid #232220;
  padding: 14px 0;
  overflow-y: auto;
  max-height: 560px;
}
@media (max-width: 600px) { .roster { display: none; } }
.roster .h {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6e6a62;
  padding: 0 16px 10px;
  border-bottom: 1px dashed #2a2926;
  margin-bottom: 8px;
}
.roster .agent {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 16px;
  font-size: 12px;
  border-left: 2px solid transparent;
}
.roster .agent.active { border-left-color: var(--signal); background: #161513; }
.roster .agent .id { color: #6e6a62; font-size: 10px; }
.roster .agent .nm { color: #ddd6c5; }
.roster .agent .st { font-size: 10px; color: var(--live); text-transform: uppercase; letter-spacing: 0.1em; }
.roster .agent.idle .st { color: #6e6a62; }
.roster .agent.queue .st { color: var(--warn); }

/* main: log stream */
.logwrap { position: relative; min-height: 0; }
.log {
  height: 100%;
  max-height: 560px;
  overflow: hidden;
  position: relative;
  padding: 14px 20px;
  font-size: 12.5px;
  line-height: 1.7;
}
.log .line {
  display: grid;
  grid-template-columns: 64px 80px 90px 1fr;
  gap: 16px;
  padding: 4px 0;
  border-bottom: 1px dashed #1f1e1c;
}
.log .line .ts { color: #6e6a62; font-size: 11px; }
.log .line .ag { color: var(--signal); font-size: 11px; }
.log .line .verb {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em;
  color: #b0a99a;
  display: flex; align-items: center; gap: 6px;
}
.log .line .verb::before {
  content: ""; width: 5px; height: 5px; background: var(--live);
}
.log .line.exp  .verb::before { background: #6db1ff; }
.log .line.plan .verb::before { background: var(--warn); }
.log .line.impl .verb::before { background: var(--live); }
.log .line.rev  .verb::before { background: #c084fc; }
.log .line.ship .verb::before { background: var(--signal); }
.log .line.merge .verb::before { background: #ddd; }

.log .line .msg { color: #e7e1d0; }
.log .line .msg b { color: #fff; font-weight: 500; }
.log .line .msg .tag {
  font-size: 10px; padding: 1px 5px;
  border: 1px solid #2a2926; color: #b0a99a;
  margin-left: 6px; vertical-align: 1px;
}

@media (max-width: 600px) {
  .log .line { grid-template-columns: 1fr; gap: 2px; }
  .log .line .ts, .log .line .ag, .log .line .verb { font-size: 10px; }
}

/* fade gradient at top of log */
.logwrap::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 36px;
  background: linear-gradient(to bottom, var(--ink), transparent);
  pointer-events: none; z-index: 2;
}

/* footer status bar */
.console .statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px;
  border-top: 1px solid #232220;
  font-size: 11px;
  color: #b0a99a;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.console .statusbar .l, .console .statusbar .r { display: flex; gap: 18px; align-items: center; }
.console .statusbar .num { color: var(--paper); }
.console .statusbar .num.signal { color: var(--signal); }
/* arash.nyc — page sections beyond the hero */

/* ---------- ticker ---------- */
.ticker {
  background: var(--ink);
  color: var(--paper);
  border-top: var(--rule);
  border-bottom: var(--rule);
  overflow: hidden;
  padding: 18px 0;
  position: relative;
}
.ticker .track {
  display: flex; gap: 0;
  white-space: nowrap;
  animation: scroll 60s linear infinite;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ticker .item { padding: 0 28px; display: inline-flex; gap: 10px; align-items: center; }
.ticker .item .v { color: var(--signal); font-weight: 600; }
.ticker .sep { color: #4a4842; }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- engagement ---------- */
.engage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule);
}
@media (max-width: 900px) { .engage-grid { grid-template-columns: 1fr; } }

.engage-card {
  padding: 36px 28px 32px;
  border-right: var(--rule-paper);
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
}
.engage-card:last-child { border-right: none; }
@media (max-width: 900px) { .engage-card { border-right: none; border-bottom: var(--rule-paper); } }

.engage-card .num {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.engage-card h3 {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1;
}
.engage-card h3 em { color: var(--signal); font-style: italic; }
.engage-card p { color: var(--ink-3); max-width: 38ch; font-size: 15px; line-height: 1.55; }
.engage-card .meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; justify-content: space-between;
  margin-top: auto; padding-top: 24px; border-top: 1px dashed var(--paper-line);
}

/* ---------- case studies ---------- */
.case {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--gutter);
  padding: 48px 0;
  border-top: var(--rule-paper);
}
.case:last-child { border-bottom: var(--rule-paper); }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; gap: 16px; } }

.case .meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink-mute);
  letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; flex-direction: column; gap: 8px;
}
.case .meta .org { color: var(--ink); font-size: 13px; }
.case .meta .yr { font-size: 11px; }

.case .body h3 {
  font-family: var(--serif);
  font-size: clamp(32px, 3.6vw, 56px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin-bottom: 18px;
}
.case .body h3 em { color: var(--signal); font-style: italic; }
.case .body p { font-size: 17px; max-width: 60ch; color: var(--ink-3); line-height: 1.55; }

.case .stats {
  display: flex; flex-wrap: wrap; gap: 32px 48px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px dashed var(--paper-line);
}
.case .stat .v {
  font-family: var(--serif); font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.02em; line-height: 0.95;
}
.case .stat .l {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute); margin-top: 4px;
}

/* ---------- how I build ---------- */
.howi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}
@media (max-width: 900px) { .howi { grid-template-columns: 1fr; } }
.howi .lede {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.howi .lede em { color: var(--signal); font-style: italic; }
.howi .body p { color: var(--ink-3); font-size: 17px; line-height: 1.55; max-width: 56ch; }
.howi .body p + p { margin-top: 18px; }

/* parallel diagram */
.parallel {
  margin-top: 40px;
  padding: 28px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  position: relative;
  overflow: hidden;
}
.parallel .h {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: #b0a99a; margin-bottom: 18px;
  display: flex; justify-content: space-between;
}
.parallel .row {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 16px; padding: 6px 0;
  font-size: 12px;
}
.parallel .row .lbl { color: #b0a99a; text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.parallel .row .bar { position: relative; height: 18px; background: #1d1c1a; }
.parallel .row .bar .fill {
  position: absolute; top: 0; bottom: 0;
  background: var(--signal);
}
.parallel .row .bar .lab {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--paper); padding: 0 8px;
  text-transform: uppercase; letter-spacing: 0.08em;
  z-index: 2;
}
.parallel .row.live .bar .fill { background: var(--live); }
.parallel .foot {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid #232220;
  display: flex; justify-content: space-between;
  font-size: 11px; color: #b0a99a;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.parallel .foot .v { color: var(--signal); }

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: var(--rule-paper);
}
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }
.about .col {
  padding: 48px 32px;
  border-right: var(--rule-paper);
}
.about .col:last-child { border-right: none; }
@media (max-width: 900px) { .about .col { border-right: none; border-bottom: var(--rule-paper); } }

.about h3 {
  font-family: var(--serif); font-size: clamp(28px, 3vw, 40px);
  font-weight: 400; letter-spacing: -0.015em;
  margin-bottom: 20px; line-height: 1;
}
.about p { color: var(--ink-3); font-size: 16px; line-height: 1.55; }
.about p + p { margin-top: 14px; }
.about .meta {
  margin-top: 20px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- expertise ---------- */
.expert {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule-paper);
}
@media (max-width: 900px) { .expert { grid-template-columns: 1fr; } }
.expert .col {
  padding: 32px 28px;
  border-right: var(--rule-paper);
}
.expert .col:last-child { border-right: none; }
@media (max-width: 900px) { .expert .col { border-right: none; border-bottom: var(--rule-paper); } }
.expert h4 {
  font-family: var(--mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute); margin-bottom: 18px;
  display: flex; justify-content: space-between;
}
.expert ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}
.expert li {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.expert li:hover { color: var(--signal); cursor: default; }

/* ---------- philosophy ---------- */
.philo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: var(--rule-paper);
}
@media (max-width: 900px) { .philo { grid-template-columns: 1fr; } }
.philo .card {
  padding: 36px 28px 28px;
  border-right: var(--rule-paper);
  border-bottom: var(--rule-paper);
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.philo .card:nth-child(3n) { border-right: none; }
@media (max-width: 900px) {
  .philo .card { border-right: none; }
  .philo .card:nth-child(3n) { border-right: none; }
}
.philo .num {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-mute); letter-spacing: 0.1em;
}
.philo h4 {
  font-family: var(--serif); font-size: 28px;
  font-weight: 400; letter-spacing: -0.015em; line-height: 1.0;
}
.philo p { color: var(--ink-3); font-size: 15px; line-height: 1.55; }
.philo .more {
  margin-top: auto; padding-top: 18px;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.philo .more:hover { color: var(--signal); cursor: pointer; }

/* ---------- projects grid (the portfolio) ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  border-top: var(--rule-paper);
}
.proj {
  border-right: var(--rule-paper);
  border-bottom: var(--rule-paper);
  padding: 24px 22px 22px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 240px;
  position: relative;
  background: var(--paper);
  transition: background .15s;
}
.proj:hover { background: var(--paper-2); }
.proj.span-3 { grid-column: span 3; }
.proj.span-4 { grid-column: span 4; }
.proj.span-6 { grid-column: span 6; }
.proj.span-8 { grid-column: span 8; }

@media (max-width: 1100px) {
  .proj.span-3, .proj.span-4 { grid-column: span 6; }
  .proj.span-6, .proj.span-8 { grid-column: span 12; }
}
@media (max-width: 600px) {
  .proj.span-3, .proj.span-4, .proj.span-6, .proj.span-8 { grid-column: span 12; }
}

.proj .top {
  display: flex; justify-content: space-between; align-items: flex-start;
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.proj .top .cat { color: var(--signal); }
.proj .top .stat { color: var(--ink-mute); }
.proj h4 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400; letter-spacing: -0.015em;
  line-height: 0.95;
}
.proj.span-6 h4, .proj.span-8 h4 { font-size: 44px; }
.proj p { color: var(--ink-3); font-size: 14px; line-height: 1.5; }
.proj .stack {
  margin-top: auto;
  display: flex; gap: 6px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-mute);
}
.proj .stack .t { padding: 3px 7px; border: 1px solid var(--paper-line); }
.proj .visit {
  font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  border-bottom: 1px solid var(--ink); padding-bottom: 2px;
  align-self: flex-start;
}
.proj:hover .visit { color: var(--signal); border-color: var(--signal); }
.proj .ribbon {
  position: absolute; top: 0; right: 0;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 4px 8px;
}
.proj .ribbon.live { background: var(--live); color: var(--ink); }
.proj .ribbon.signal { background: var(--signal); color: var(--ink); }

/* ---------- testimonials ---------- */
.testi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule-paper);
}
@media (max-width: 900px) { .testi { grid-template-columns: 1fr; } }
.testi blockquote {
  padding: 36px 28px;
  border-right: var(--rule-paper);
  display: flex; flex-direction: column; gap: 18px;
}
.testi blockquote:last-child { border-right: none; }
@media (max-width: 900px) {
  .testi blockquote { border-right: none; border-bottom: var(--rule-paper); }
}
.testi .q {
  font-family: var(--serif); font-size: 22px;
  letter-spacing: -0.01em; line-height: 1.2;
  color: var(--ink-2);
}
.testi .q::before { content: "\201C"; color: var(--signal); margin-right: 4px; }
.testi cite {
  font-family: var(--mono); font-size: 11px;
  font-style: normal;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin-top: auto;
}

/* ---------- blog ---------- */
.blog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule-paper);
  border-bottom: var(--rule-paper);
}
@media (max-width: 900px) { .blog { grid-template-columns: 1fr; } }
.blog .post {
  padding: 32px 28px;
  border-right: var(--rule-paper);
  display: flex; flex-direction: column; gap: 14px;
}
.blog .post:last-child { border-right: none; }
@media (max-width: 900px) {
  .blog .post { border-right: none; border-bottom: var(--rule-paper); }
  .blog .post:last-child { border-bottom: none; }
}
.blog .date {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.blog h4 {
  font-family: var(--serif); font-size: 26px;
  font-weight: 400; letter-spacing: -0.015em;
  line-height: 1.05;
}
.blog p { color: var(--ink-3); font-size: 15px; line-height: 1.55; }
.blog .read {
  margin-top: auto; padding-top: 12px;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* ---------- contact / footer ---------- */
.contact {
  background: var(--ink); color: var(--paper);
  padding: clamp(64px, 10vw, 160px) 0;
  position: relative;
  overflow: hidden;
}
.contact .big {
  font-family: var(--serif);
  font-size: clamp(64px, 11vw, 200px);
  line-height: 0.85;
  letter-spacing: -0.035em;
  text-transform: lowercase;
}
.contact .big em { color: var(--signal); font-style: italic; }
.contact .row {
  display: flex; justify-content: space-between; align-items: end;
  flex-wrap: wrap; gap: 24px;
  margin-top: 56px;
}
.contact .links {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 14px;
}
.contact .links a { color: var(--paper); border-bottom: 1px solid #2a2926; padding-bottom: 4px; }
.contact .links a:hover { color: var(--signal); border-color: var(--signal); }

.foot {
  background: var(--ink); color: #6e6a62;
  border-top: 1px solid #232220;
  padding: 18px 0;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.foot .row {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}

/* portrait img override (replaces design's <image-slot> custom element) */
.masthead .portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* blog page (re-skin) */
.article {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(48px, 6vw, 96px) var(--gutter);
}
.article .meta-row {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.article h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin-bottom: 24px;
}
.article .lede {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.3;
  color: var(--ink-2);
  margin-bottom: 32px;
}
.article .prose { font-family: var(--sans); font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.article .prose p { margin: 0 0 18px; }
.article .prose h2 { font-family: var(--serif); font-size: clamp(28px, 3vw, 40px); font-weight: 400; letter-spacing: -0.015em; margin: 40px 0 16px; line-height: 1.05; }
.article .prose h3 { font-family: var(--serif); font-size: 24px; font-weight: 400; margin: 32px 0 12px; }
.article .prose a { color: var(--signal); border-bottom: 1px solid var(--signal); }
.article .prose a:hover { background: var(--signal); color: var(--ink); }
.article .prose strong { font-weight: 600; color: var(--ink); }
.article .prose em { font-style: italic; }
.article .prose ul, .article .prose ol { margin: 0 0 18px 22px; }
.article .prose li { margin: 6px 0; }
.article .prose blockquote {
  border-left: 3px solid var(--signal);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
  color: var(--ink-3);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.3;
}
.article .prose code {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--paper-2);
  padding: 2px 6px;
}
.article .prose pre {
  background: var(--ink);
  color: var(--paper);
  padding: 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 18px;
}
.article .prose pre code { background: transparent; padding: 0; color: inherit; }
.article .prose img { margin: 24px 0; border: 1px solid var(--paper-line); }

.article .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px dashed var(--paper-line);
}
.article .tags a {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border: 1px solid var(--ink-line);
  color: var(--ink-mute);
}
.article .tags a:hover { color: var(--signal); border-color: var(--signal); }

.article .back {
  display: inline-block;
  margin-bottom: 24px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.article .back:hover { color: var(--signal); }

/* blog index header */
.blog-head {
  padding: clamp(48px, 6vw, 96px) 0 clamp(24px, 3vw, 48px);
}
.blog-head h1 {
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 144px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.blog-head h1 em { font-style: italic; color: var(--signal); }
.blog-head .tagrow {
  margin-top: 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.blog-head .tagrow a {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid var(--ink-line);
  color: var(--ink-mute);
}
.blog-head .tagrow a.active,
.blog-head .tagrow a:hover { color: var(--signal); border-color: var(--signal); }

/* full blog index list (re-uses .blog grid but extends to N rows) */
.blog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule-paper);
}
@media (max-width: 900px) { .blog-list { grid-template-columns: 1fr; } }
.blog-list .post {
  padding: 32px 28px;
  border-right: var(--rule-paper);
  border-bottom: var(--rule-paper);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 220px;
}
.blog-list .post:nth-child(3n) { border-right: none; }
@media (max-width: 900px) {
  .blog-list .post { border-right: none; }
}
.blog-list .date { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-mute); }
.blog-list h4 { font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: -0.015em; line-height: 1.05; }
.blog-list p { color: var(--ink-3); font-size: 15px; line-height: 1.55; }
.blog-list .post:hover h4 { color: var(--signal); }
.blog-list .read { margin-top: auto; padding-top: 12px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }

/* automation pillar (designed in HTML, missing from bundle CSS) */
.automation { border-top: var(--rule-paper); }
.automation .a-lede {
  padding: 28px 0 32px;
  max-width: 80ch;
}
.automation .a-lede p {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink-2);
}
.automation .a-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--rule-paper);
}
@media (max-width: 900px) { .automation .a-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .automation .a-grid { grid-template-columns: 1fr; } }
.automation .a-cell {
  padding: 28px 24px;
  border-right: var(--rule-paper);
  border-bottom: var(--rule-paper);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 180px;
}
.automation .a-cell:nth-child(3n) { border-right: none; }
@media (max-width: 900px) {
  .automation .a-cell:nth-child(3n) { border-right: var(--rule-paper); }
  .automation .a-cell:nth-child(2n) { border-right: none; }
}
@media (max-width: 600px) {
  .automation .a-cell { border-right: none; }
}
.automation .a-tag {
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.automation .a-name {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400; letter-spacing: -0.015em; line-height: 1;
}
.automation .a-note { font-size: 14px; color: var(--ink-3); line-height: 1.5; max-width: 38ch; }
.automation .a-cell.signal { background: var(--ink); color: var(--paper); }
.automation .a-cell.signal .a-tag { color: var(--signal); }
.automation .a-cell.signal .a-name { color: var(--signal); font-style: italic; }
.automation .a-cell.signal .a-note { color: #ddd6c5; }
