/* porras.dev — copper & verdigris on cold iron. Grotesque display, sans body.

   Copper and verdigris are the same metal at two ages: systems that endure.
   Claude came up with that metaphor and has been unbearably smug about it
   ever since. Porras approved the palette; the smugness was non-negotiable.
   v2: same metal, colder forge. The parchment went; the metaphor stayed. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #0f1013;
  --surface: #16181d;
  --surface-2: #1c1f25;
  --hairline: #262930;
  --text: #edece8;
  --muted: #92959d;
  --copper: #e68a3e;
  --copper-soft: #c97a35;
  --verdigris: #74b898;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafaf8;
    --surface: #f1f1ed;
    --surface-2: #e9e9e2;
    --hairline: #e2e2da;
    --text: #141519;
    --muted: #5f636b;
    --copper: #b45a1d;
    --copper-soft: #9c4f1a;
    --verdigris: #2c7a55;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--copper); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible,
:focus-visible { outline: 2px solid var(--verdigris); outline-offset: 3px; border-radius: 2px; }

main, .head-inner, .site-foot {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Header */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.head-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.1rem;
}

.brand {
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--copper);
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.6rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--copper); text-decoration: none; }

/* Hero */

.hero {
  padding-block: clamp(4rem, 14vh, 9rem) clamp(3rem, 8vh, 6rem);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero-text { flex: 1 1 24rem; }

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 7.5vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 14ch;
  text-wrap: balance;
}

.hero h1 em {
  font-style: normal;
  color: var(--copper);
}

.lede {
  margin-top: 2.25rem;
  max-width: 40rem;
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  color: var(--muted);
}

/* The portrait is served scrambled (an 8x8 tile shuffle). Each cell below
   picks its true tile out of the jumbled portrait.jpg via background-position.
   The assembled face exists only as rendered output, never as a file. */

.portrait-figure { flex: 0 1 clamp(15rem, 26vw, 21rem); max-width: 100%; }

.portrait {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  overflow: hidden;
  border-radius: 14px;
  filter: grayscale(0.85) sepia(0.12) contrast(1.05) brightness(0.94);
}

.portrait i {
  background-image: url("portrait.jpg");
  background-size: 800% 800%;
  background-position: calc(var(--sx) * 100% / 7) calc(var(--sy) * 100% / 7);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.portrait-caption {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.71875rem;
  line-height: 1.6;
  color: var(--muted);
}

.portrait-caption b { font-weight: 400; color: var(--verdigris); }

/* Sections */

.section { padding-block: clamp(3.5rem, 9vh, 6.5rem); }

.section + .section { border-top: 1px solid var(--hairline); }

.anchor-key {
  display: block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--verdigris);
  margin-bottom: 0.9rem;
}

.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.875rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: clamp(2.25rem, 5vh, 3.5rem);
}

.section-note {
  color: var(--muted);
  max-width: 40rem;
  margin: calc(clamp(2.25rem, 5vh, 3.5rem) * -0.55) 0 2.5rem;
  font-size: 0.9375rem;
}

/* Vision ledger — hanging config keys, air instead of stripes */

.ledger { display: grid; }

.ledger-row {
  display: grid;
  grid-template-columns: minmax(11rem, 16rem) 1fr;
  gap: 0.8rem 3.5rem;
  padding-block: 1.9rem;
}

.ledger-row + .ledger-row { border-top: 1px solid var(--hairline); }

.ledger-row dt {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--copper);
  padding-top: 0.2rem;
  overflow-wrap: anywhere;
}

.ledger-row dd { max-width: 44rem; }

@media (max-width: 40rem) {
  .ledger-row { grid-template-columns: 1fr; }
}

.direction {
  margin-top: 3.25rem;
  padding: 2rem 2.25rem;
  border-left: 3px solid var(--verdigris);
  border-radius: 0 14px 14px 0;
  background: var(--surface);
}

.direction-key {
  display: block;
  font-family: var(--mono);
  font-size: 0.9375rem;
  color: var(--verdigris);
  margin-bottom: 0.6rem;
}

/* Skills — four quiet columns, then the meta band */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: 3rem 4rem;
}

.skill h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3125rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.8rem;
}

.skill h3::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  margin-top: 0.6rem;
  background: var(--copper);
  border-radius: 2px;
}

.skill p { color: var(--text); font-size: 0.9875rem; }

.skill .tags {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.78125rem;
  line-height: 1.8;
  color: var(--muted);
}

/* This is the differentiator, so it gets the band the others don't. */
.skill-meta {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 2.25rem 2.5rem;
}

.skill-meta h3::after { background: var(--verdigris); }

.skill-meta p { max-width: 46rem; }

/* Proof points — a wall of cards instead of a wall of stripes */

.proof {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
}

.proof li {
  padding: 1.4rem 1.5rem;
  border-radius: 14px;
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s;
}

.proof li:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--copper) 55%, var(--hairline));
}

.proof-tag {
  display: block;
  font-family: var(--mono);
  font-size: 0.71875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--verdigris);
  margin-bottom: 0.45rem;
}

.proof-also {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
  max-width: 48rem;
}

/* Experience — an actual timeline; the one place order is the information */

.xp {
  list-style: none;
  display: grid;
  gap: 0;
  border-left: 2px solid var(--hairline);
  margin-left: 0.4rem;
}

.xp li {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 2rem;
  padding: 0 0 2rem 2rem;
  max-width: 54rem;
  font-size: 0.9875rem;
}

.xp li:last-child { padding-bottom: 0.25rem; }

.xp li::before {
  content: "";
  position: absolute;
  left: -0.4375rem;
  top: 0.42rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--copper);
}

.xp li > div { flex: 1 1 18rem; }

.xp-period {
  flex: 0 1 11.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--verdigris);
  padding-top: 0.2rem;
  white-space: nowrap;
}

.xp strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.xp-note {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Education — same rail, quieter dots */

.xp-edu li::before { border-color: var(--verdigris); }

/* Contact */

.contact { padding-bottom: 4rem; }

.contact-line { color: var(--muted); margin-bottom: 1.25rem; }

.contact-mail {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(1.875rem, 5.5vw, 3.75rem);
  color: var(--copper);
  overflow-wrap: anywhere;
}

.contact-mail:hover { color: var(--copper-soft); text-decoration-thickness: 3px; }

button.contact-mail {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: copy;
}

.mail-addr { user-select: all; }

.mail-hint {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.contact-mail.copied .mail-hint { color: var(--verdigris); }

.contact-gh {
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.9375rem;
}

.contact-gh a { color: var(--verdigris); }

/* Footer */

.site-foot {
  padding-block: 2.25rem 3rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
  font-family: var(--mono);
  color: var(--muted);
}

/* Reveal animation — hero only, load-time, staggered.
   Exactly one animation on this page. Early drafts had more.
   evidence-first also applies to whether animations earn their keep. */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .reveal-2 { animation-delay: 0.18s; }
  .reveal-3 { animation-delay: 0.3s; }
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}
