/* Blackcat Data Solutions
   One idea: the page is a dark room and the cat is watching.
   Everything else stays quiet so the eyes can do the work. */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --night: #000000;      /* the room */
  --fur: #141416;        /* raised surfaces, just visible */
  --whisker: #ECEAE4;    /* text */
  --slate: #8A929B;      /* Welsh slate, secondary text */
  --amber: #E8B923;      /* the iris, used for focus and action only */
  --rule: #26272B;

  --bg: var(--night);
  --fg: var(--whisker);
  --muted: var(--slate);
  --line: var(--rule);
  --raised: var(--fur);
  --action: var(--amber);
  --action-ink: #000;

  --pad: clamp(1rem, 4vw, 3rem);
  --measure: 34rem;
  color-scheme: dark;
}

/* Lights on: same room in daylight. Pupils become slits in JS. */
:root.lights-on {
  --bg: #E9E6DD;
  --fg: #0A0A0A;
  --muted: #545A60;
  --line: #CFCAC0;
  --raised: #DEDACF;
  --action: #0A0A0A;
  --action-ink: #E9E6DD;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Bricolage", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "wght" 380;
  transition: background-color .6s ease, color .6s ease;
}
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1; letter-spacing: -0.025em; }
p { margin: 0 0 1em; }
a { color: inherit; }
::selection { background: var(--amber); color: #000; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.lights-on :focus-visible { outline-color: #0A0A0A; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--pad); top: 1rem; z-index: 10; background: var(--fg); color: var(--bg); padding: .5rem 1rem; }

/* Header */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem var(--pad);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand__mark { width: 1.6rem; height: 1.6rem; fill: var(--fg); }
.brand__eye { fill: var(--amber); }
.lights-on .brand__eye { fill: var(--bg); }
.nav { display: flex; gap: clamp(.9rem, 2.5vw, 2rem); }
.nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.nav a:hover { color: var(--fg); }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 6rem var(--pad) clamp(2rem, 6vh, 4rem);
  overflow: hidden;
}

.eyes {
  align-self: center; justify-self: center;
  display: flex; gap: clamp(2.5rem, 9vw, 8rem);
  background: none; border: 0; padding: 1.5rem; margin: 0;
  cursor: pointer; border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}
.eye { width: clamp(6.5rem, 17vw, 15rem); height: auto; overflow: visible; }
.eye__lid { transform-box: fill-box; transform-origin: center; transition: transform .09s ease-in; }
.eyes.is-blinking .eye__lid { transform: scaleY(.04); }
.eye__white { fill: #000; }
.eye__rim { fill: none; stroke: transparent; stroke-width: 3; transition: stroke .6s ease; }
.eye__pupil { fill: #000; }
.eye__glint { fill: #fff; opacity: .85; }
.eye__iris { filter: drop-shadow(0 0 18px rgba(232, 185, 35, .55)); }
.lights-on .eye__white { fill: #1a1a1a; }
.lights-on .eye__rim { stroke: #0A0A0A; }
.lights-on .eye__iris { filter: none; }

.hero__text {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
}
.hero__title {
  font-size: clamp(3.1rem, 9.2vw, 9rem);
  line-height: .9;
  letter-spacing: -0.045em;
  font-variation-settings: "wght" 760;
  text-wrap: balance;
  max-width: 11ch;
}
.hero__aside { max-width: var(--measure); padding-bottom: .4rem; }
.hero__aside p:first-child { color: var(--muted); font-size: 1.1rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin: 1.5rem 0 0; }
.hero__hint {
  position: absolute; left: 50%; top: 50%;
  transform: translateX(-50%);
  margin: 0; font-size: .9rem; color: var(--muted); text-align: center; width: max-content; max-width: calc(100% - 2 * var(--pad));
  opacity: 0; transition: opacity .5s ease;
}
.hero__hint.is-visible { opacity: 1; }

.button {
  display: inline-block; text-decoration: none;
  background: var(--action); color: var(--action-ink);
  font-weight: 650; padding: .8rem 1.4rem; border-radius: 999px;
  transition: transform .15s ease;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.link { text-decoration-thickness: 1px; text-underline-offset: .25em; color: var(--fg); }
.link:hover { text-decoration-color: var(--amber); text-decoration-thickness: 2px; }

/* Sections */
section:not(.hero) { padding: clamp(4.5rem, 12vw, 9rem) var(--pad); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head h2, .process h2, .about h2 {
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  letter-spacing: -0.04em;
  font-variation-settings: "wght" 720;
}
.section-head p { color: var(--muted); max-width: var(--measure); margin: 0; }

/* Services: a list of pains you can open */
.work__list { border-top: 1px solid var(--line); }
.job { border-bottom: 1px solid var(--line); }
.job summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 2rem;
  gap: 2rem; align-items: baseline;
  padding: clamp(1.1rem, 2.6vw, 1.75rem) 0;
}
.job summary::-webkit-details-marker { display: none; }
.job summary::after {
  content: ""; width: .8rem; height: .8rem; justify-self: end; align-self: center;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-25%);
  transition: transform .25s ease;
}
.job[open] summary::after { transform: rotate(-135deg) translateY(-25%); border-color: var(--amber); }
.lights-on .job[open] summary::after { border-color: var(--fg); }
.job__name { font-size: clamp(1.6rem, 3.6vw, 2.75rem); font-weight: 650; letter-spacing: -0.03em; line-height: 1.05; }
.job__pain { color: var(--muted); max-width: 28rem; }
.job summary:hover .job__name { color: var(--amber); }
.lights-on .job summary:hover .job__name { color: var(--fg); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }
.job__body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem; padding: 0 2rem 2rem 0;
  animation: open .3s ease;
}
.job__body > p { grid-column: 1; margin: 0; max-width: var(--measure); }
.job__body ul { grid-column: 2; margin: 0; padding: 0; list-style: none; }
.job__body li { padding: .35rem 0 .35rem 1.2rem; position: relative; }
.job__body li::before { content: ""; position: absolute; left: 0; top: .95rem; width: .45rem; height: .45rem; border-radius: 50%; background: var(--amber); }
.lights-on .job__body li::before { background: var(--fg); }
@keyframes open { from { opacity: 0; transform: translateY(-.4rem); } }

/* Process: a real sequence, so it is numbered */
.process { background: var(--raised); }
.process h2 { margin-bottom: clamp(2rem, 5vw, 3rem); }
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem;
}
.steps li { counter-increment: step; color: var(--muted); max-width: 18rem; }
.steps li::before {
  content: counter(step);
  display: block; font-size: 3.5rem; line-height: 1; font-weight: 300;
  color: var(--fg); margin-bottom: .75rem; letter-spacing: -0.04em;
}
.steps strong { display: block; color: var(--fg); font-weight: 650; font-size: 1.2rem; }

/* Nine lives */
.lives__grid {
  list-style: none; margin: 0; padding: 0; counter-reset: life;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.life { counter-increment: life; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.life a {
  position: relative; display: flex; flex-direction: column; gap: .6rem; height: 100%;
  padding: clamp(1.25rem, 2.5vw, 2rem); padding-top: clamp(3.5rem, 6vw, 4.5rem);
  text-decoration: none;
  transition: background-color .25s ease;
}
.life a::before {
  content: counter(life);
  position: absolute; top: clamp(1rem, 2vw, 1.5rem); left: clamp(1.25rem, 2.5vw, 2rem);
  font-size: 1.1rem; color: var(--muted); font-variation-settings: "wght" 500;
}
.life a::after {
  content: ""; position: absolute; top: clamp(1.35rem, 2.4vw, 1.85rem); right: clamp(1.25rem, 2.5vw, 2rem);
  width: .55rem; height: .55rem; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s ease, border-color .2s ease;
}
.life a:hover { background: var(--raised); }
.life a:hover::after { border-color: var(--amber); transform: translateX(3px) rotate(45deg); }
.lights-on .life a:hover::after { border-color: var(--fg); }
.life__name { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 650; letter-spacing: -0.025em; line-height: 1.1; }
.life__what { color: var(--muted); font-size: .98rem; }
.life__tech { margin-top: auto; padding-top: .75rem; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .8rem; color: var(--muted); }
.life--feature .life__name { color: var(--amber); }
.lights-on .life--feature .life__name { color: var(--fg); }
.lives__more { margin: 2rem 0 0; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; border-top: 1px solid var(--line); }
.about__body { max-width: var(--measure); }
.about__body p { color: var(--muted); }
.about__lead { color: var(--fg) !important; font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.3; font-variation-settings: "wght" 500; }

/* Contact: the second loud moment, all type */
.contact { text-align: left; border-top: 1px solid var(--line); }
.contact h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-variation-settings: "wght" 500; letter-spacing: -0.02em; color: var(--muted); margin-bottom: 1.5rem; }
.contact .contact__big {
  color: var(--fg);
  font-size: clamp(2.8rem, 9vw, 8.5rem);
  font-variation-settings: "wght" 760;
  letter-spacing: -0.05em; line-height: .95;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact__aside { max-width: 26rem; }

/* Contact form: quiet fields, the amber only on focus and the button */
.contact-form { display: grid; gap: 1.5rem; }
.contact-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.contact-form__field { display: grid; gap: .45rem; }
.contact-form label { font-size: .95rem; color: var(--muted); }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--fg); width: 100%;
  background: var(--raised); border: 1px solid var(--line); border-radius: 6px;
  padding: .85rem 1rem; transition: border-color .2s ease;
}
.contact-form textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(232, 185, 35, .25); }
.lights-on .contact-form input:focus, .lights-on .contact-form textarea:focus { border-color: var(--fg); box-shadow: 0 0 0 3px rgba(0, 0, 0, .12); }
.contact-form [aria-invalid="true"] { border-color: #FF7A6B; }
.lights-on .contact-form [aria-invalid="true"] { border-color: #B42318; }
.contact-form__error { min-height: 1.2em; font-size: .9rem; color: #FF9B8F; }
.lights-on .contact-form__error, .lights-on .contact-form__status.is-error { color: #B42318; }
.contact-form__error:empty { min-height: 0; }
.contact-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.contact-form .button { border: 0; font: inherit; font-weight: 650; cursor: pointer; }
.contact-form .button:disabled { opacity: .6; cursor: progress; transform: none; }
.contact-form__status { margin: 0; color: var(--muted); }
.contact-form__status.is-error { color: #FF9B8F; }
.contact-form__done { padding: 2rem; border: 1px solid var(--amber); border-radius: 8px; }
.lights-on .contact-form__done { border-color: var(--fg); }
.contact-form__done:focus { outline: none; }
.contact-form__done-title { font-size: clamp(1.4rem, 2.6vw, 2rem); font-variation-settings: "wght" 650; letter-spacing: -0.02em; color: var(--fg) !important; line-height: 1.2; }
.contact p { color: var(--muted); }
.contact p .link + .link { margin-left: 1.25rem; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding: 2rem var(--pad) 2.5rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .9rem;
}
.foot p { margin: 0; }

/* LinkedIn posts */
.posts { border-top: 1px solid var(--line); }
.posts[hidden] { display: none; }
.posts__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1.25rem; align-items: start; }
.post { background: var(--raised); border-radius: 6px; }
.post__card { display: flex; flex-direction: column; gap: 1rem; height: 100%; padding: 1.5rem; text-decoration: none; border-radius: 6px; border: 1px solid transparent; transition: border-color .2s ease; }
.post__card:hover { border-color: var(--amber); }
.lights-on .post__card:hover { border-color: var(--fg); }
.post__date { color: var(--muted); font-size: .9rem; }
.post__text { font-size: 1.15rem; line-height: 1.45; font-variation-settings: "wght" 460; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.post__more { margin-top: auto; color: var(--muted); font-size: .95rem; text-decoration: underline; text-underline-offset: .25em; }
.post__card:hover .post__more { color: var(--fg); }
.post--embed { background: #fff; overflow: hidden; }
.post--embed iframe { display: block; width: 100%; border: 0; }

/* Smaller screens */
@media (max-width: 860px) {
  .hero__text, .section-head, .about, .contact__grid, .contact-form__row { grid-template-columns: 1fr; }
  .hero { padding-top: 5rem; }
  .job summary { grid-template-columns: minmax(0, 1fr) 1.5rem; gap: .35rem 1rem; }
  .job__pain { grid-column: 1; grid-row: 2; }
  .job summary::after { grid-column: 2; grid-row: 1 / span 2; }
  .job__body { grid-template-columns: 1fr; padding-right: 0; }
  .job__body ul { grid-column: 1; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lives__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .nav a:not(:last-child) { display: none; }
  .steps, .lives__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(2.9rem, 15vw, 4.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* Projects beyond the first nine, and optional screenshots */
.life__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; margin-bottom: .4rem; background: var(--raised); }
.more { margin-top: clamp(2.5rem, 6vw, 4rem); }
.more__title { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.03em; font-variation-settings: "wght" 650; margin-bottom: 1rem; }
.more__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.more__list li { border-bottom: 1px solid var(--line); }
.more__list a { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) 9rem; gap: 1.5rem; align-items: baseline; padding: 1rem 0; text-decoration: none; }
.more__list a:hover .more__name { color: var(--amber); }
.lights-on .more__list a:hover .more__name { color: var(--fg); text-decoration: underline; }
.more__name { font-weight: 650; font-size: 1.15rem; }
.more__what { color: var(--muted); }
.more__tech { text-align: right; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .8rem; color: var(--muted); }
@media (max-width: 860px) {
  .more__list a { grid-template-columns: 1fr; gap: .2rem; }
  .more__tech { text-align: left; }
}
