/* ══════════════════════════════════════════════════════════════
   COMPONENTS — one block per section renderer
   ══════════════════════════════════════════════════════════════ */

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: var(--s-4);
  padding: 0.85rem 1.3rem;
  border: var(--hair) solid var(--line-hard);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--ink);
  overflow: hidden;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn span, .btn i { position: relative; z-index: 1; font-style: normal; }
.btn i { transition: transform 0.4s var(--ease); }
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--flare);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-sharp);
}
.btn:hover { color: var(--flare-ink); border-color: var(--flare); }
.btn:hover::before { transform: none; }
.btn:hover i { transform: translate(3px, -3px); }

.btn--solid { background: var(--flare); border-color: var(--flare); color: var(--flare-ink); }
.btn--solid::before { background: var(--ink); }
.btn--solid:hover { color: var(--bg); border-color: var(--ink); }

/* ── 01 · PROFILE ──────────────────────────────────────────── */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--s-8) var(--s-9);
  align-items: start;
}
.profile__dossier {
  border: var(--hair) solid var(--line);
  background: var(--surface);
  padding: var(--s-5);
}
.profile__dossier h3 {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--flare);
  padding-bottom: var(--s-4);
  border-bottom: var(--hair) solid var(--line);
  margin-bottom: var(--s-2);
}
.profile__row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: var(--hair) solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
}
.profile__row:last-child { border-bottom: 0; }
.profile__row dt { color: var(--ink-faint); letter-spacing: var(--tr-wide); text-transform: uppercase; }
.profile__row dd { color: var(--ink); text-align: right; }

/* ── 02 · CAPABILITIES ─────────────────────────────────────── */
/* Cells are outlined rather than separated by a coloured gap, so a grid
   with an empty trailing cell does not show a stray block of colour. */
.caps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--hair);
  border: var(--hair) solid var(--line);
}
.cap {
  background: var(--bg);
  outline: var(--hair) solid var(--line);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-4);
  transition: background 0.35s var(--ease);
}
.cap:hover { background: var(--surface); }
.cap__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.cap__name {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 110, "wght" 780;
  text-transform: uppercase;
  letter-spacing: var(--tr-snug);
  font-size: var(--t-md);
  line-height: 1;
}
.cap__no { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--flare); letter-spacing: var(--tr-wide); }
.cap__list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: var(--hair) solid var(--line);
  padding: 0.3rem 0.55rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cap:hover .chip { border-color: var(--line-hard); color: var(--ink); }
.cap__note { font-size: var(--t-sm); color: var(--ink-faint); line-height: 1.5; margin-top: auto; }

/* ── 03 · DEPLOYMENTS (work) ───────────────────────────────── */
.deploys { border-top: var(--hair) solid var(--line); }

.deploy {
  position: relative;
  display: block;
  border-bottom: var(--hair) solid var(--line);
  overflow: hidden;
}
.deploy__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
  gap: var(--s-5);
  align-items: center;
  padding: var(--s-5) var(--s-4);
  transition: color 0.4s var(--ease), padding 0.5s var(--ease);
}
.deploy::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--flare);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s var(--ease-sharp);
}
.deploy:hover::before, .deploy:focus-visible::before { transform: none; }
.deploy:hover .deploy__inner, .deploy:focus-visible .deploy__inner { color: var(--flare-ink); padding-left: var(--s-6); }

/* Rows with no link still highlight, but do not pretend to be clickable. */
.deploy--static { cursor: default; }
.deploy--static:hover .deploy__inner { padding-left: var(--s-4); }

.deploy__no {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--ink-faint);
  letter-spacing: var(--tr-wide);
  transition: color 0.4s var(--ease);
}
.deploy:hover .deploy__no { color: var(--flare-ink); }

.deploy__name {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 114, "wght" 800;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 2.6vw, 2.35rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.deploy__tags { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-3); }
.deploy:hover .chip { border-color: currentColor; color: inherit; }

.deploy__summary { font-size: var(--t-sm); color: var(--ink-dim); line-height: 1.5; max-width: 44ch; transition: color 0.4s var(--ease); }
.deploy:hover .deploy__summary { color: var(--flare-ink); }

.deploy__aside { display: flex; align-items: center; gap: var(--s-5); font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: var(--tr-wide); }
.deploy__year { color: var(--ink-faint); transition: color 0.4s var(--ease); }
.deploy:hover .deploy__year { color: var(--flare-ink); }
.deploy__arrow { font-size: 1.15rem; transition: transform 0.45s var(--ease); }
.deploy:hover .deploy__arrow { transform: translate(5px, -5px); }

.deploy__status {
  border: var(--hair) solid currentColor;
  padding: 0.22rem 0.45rem;
  color: var(--flare);
  transition: color 0.4s var(--ease);
}
.deploy:hover .deploy__status { color: var(--flare-ink); }

/* ── 04 · SERVICE RECORD (timeline) ────────────────────────── */
.log { display: flex; flex-direction: column; }
.log__row {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: var(--s-5) var(--s-6);
  padding: var(--s-6) 0;
  border-top: var(--hair) solid var(--line);
  position: relative;
}
.log__row::after {
  content: "";
  position: absolute; left: 0; top: -1px;
  width: 0; height: var(--hair);
  background: var(--flare);
  transition: width 0.7s var(--ease);
}
.log__row.in::after { width: 100%; }

.log__when { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: var(--tr-wide); color: var(--flare); }
.log__where { color: var(--ink-faint); font-family: var(--font-mono); font-size: var(--t-micro); margin-top: var(--s-2); letter-spacing: var(--tr-wide); }
.log__what {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 110, "wght" 760;
  text-transform: uppercase;
  font-size: var(--t-lg);
  line-height: 1.02;
  letter-spacing: var(--tr-snug);
}
.log__note { margin-top: var(--s-3); color: var(--ink-dim); font-size: var(--t-sm); line-height: 1.6; max-width: 58ch; }

/* ── 05 · TRANSMISSIONS (writing) ──────────────────────────── */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: var(--hair);
  border: var(--hair) solid var(--line);
}

.post {
  background: var(--bg);
  outline: var(--hair) solid var(--line);
  padding: var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-4);
  text-align: left;
  min-height: 15rem;
  transition: background 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.post::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--flare);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-sharp);
}
.post:hover { background: var(--surface); }
.post:hover::after { transform: none; }

.post__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: var(--tr-wide); color: var(--ink-faint); }
.post__tag { color: var(--flare); }
.post__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 108, "wght" 780;
  text-transform: uppercase;
  font-size: var(--t-lg);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.post__excerpt { color: var(--ink-dim); font-size: var(--t-sm); line-height: 1.6; }
.post__more { margin-top: auto; font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: var(--tr-wide); color: var(--ink-faint); display: flex; align-items: center; gap: var(--s-3); transition: color 0.3s var(--ease), gap 0.3s var(--ease); }
.post:hover .post__more { color: var(--flare); gap: var(--s-4); }

/* ── 06 · CONTACT ──────────────────────────────────────────── */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--s-8) var(--s-9); align-items: start; }
.contact__lede { font-size: var(--t-lg); line-height: 1.35; color: var(--ink-dim); letter-spacing: var(--tr-snug); max-width: 30ch; }

.channels { border-top: var(--hair) solid var(--line); }
.channel {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-5) 0;
  border-bottom: var(--hair) solid var(--line);
  transition: padding 0.45s var(--ease);
}
.channel:hover { padding-left: var(--s-4); padding-right: var(--s-4); }
.channel__label { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: var(--tr-wider); color: var(--ink-faint); flex: none; width: 6.5rem; }
.channel__value {
  flex: 1;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 104, "wght" 700;
  text-transform: uppercase;
  font-size: clamp(1rem, 1.9vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  transition: color 0.3s var(--ease);
  overflow-wrap: anywhere;
}
.channel:hover .channel__value { color: var(--flare); }
.channel__arrow { font-style: normal; color: var(--ink-faint); transition: transform 0.4s var(--ease), color 0.3s var(--ease); }
.channel:hover .channel__arrow { transform: translate(4px, -4px); color: var(--flare); }

/* ── PROSE SECTION (generic, user-addable) ─────────────────── */
.sec__body > .prose { max-width: 68ch; }

/* ══════════════════════════════════════════════════════════════
   READER OVERLAY
   ══════════════════════════════════════════════════════════════ */
.reader { position: fixed; inset: 0; z-index: 150; }
.reader[hidden] { display: none; }

.reader__scrim {
  position: absolute; inset: 0;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.reader.is-open .reader__scrim { opacity: 1; }

.reader__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(60rem, 100%);
  background: var(--bg-2);
  border-left: var(--hair) solid var(--line);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.6s var(--ease-sharp);
  box-shadow: -40px 0 90px -30px var(--shade);
}
.reader.is-open .reader__panel { transform: none; }

.reader__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-6);
  border-bottom: var(--hair) solid var(--line);
  color: var(--ink-faint);
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wide);
  flex: none;
}

.reader__body { overflow-y: auto; padding: var(--s-8) var(--s-6) var(--s-9); }
.reader__title {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 114, "wght" 820;
  text-transform: uppercase;
  font-size: var(--t-xl);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: var(--s-4) 0 var(--s-6);
  max-width: 20ch;
}
.reader__body .prose { max-width: 66ch; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .profile, .contact { grid-template-columns: 1fr; }
  .deploy__inner { grid-template-columns: 3.5rem minmax(0, 1fr) auto; }
  .deploy__summary { display: none; }
}

@media (max-width: 700px) {
  .deploy__inner { grid-template-columns: 2.75rem minmax(0, 1fr); gap: var(--s-4); }
  .deploy__aside { grid-column: 2; justify-content: space-between; }
  .log__row { grid-template-columns: 1fr; gap: var(--s-3); }
  .reader__body { padding: var(--s-7) var(--s-5) var(--s-8); }
  .channel__label { width: 4.5rem; }
}

/* ══════════════════════════════════════════════════════════════
   CONTACT FORM
   ══════════════════════════════════════════════════════════════ */
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4) var(--s-4);
  align-content: start;
}
.field { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.field--wide { grid-column: 1 / -1; }

.field > label {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.field > label span { color: var(--flare); }

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: var(--hair) solid var(--line);
  border-radius: var(--radius);
  padding: 0.78rem 0.85rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.4;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 8.5rem; }

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--line-hard); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--flare);
  background: var(--surface);
}

/* Custom caret, since appearance is reset above. Painted onto the select
   itself rather than the field, so a validation message appearing below
   cannot drag it out of position. */
.field select {
  padding-right: 2.4rem;
  cursor: pointer;
  background-image: var(--caret);
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 0.62rem auto;
}
.field select option { background: var(--bg); color: var(--ink); }

/* ── VALIDATION ────────────────────────────────────────────── */
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--error); }

.field__error {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--error);
  min-height: 0;
}
.field__error:empty { display: none; }

/* Honeypot — must stay in the DOM but never be reachable. */
.field--trap {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}

/* ── ACTIONS + STATUS ──────────────────────────────────────── */
.form__foot {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: var(--s-5);
  flex-wrap: wrap;
  margin-top: var(--s-2);
}
.form__status {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--ink-faint);
}
.form__status[data-state="error"] { color: var(--error); }
.form__status[data-state="sending"] { color: var(--flare); }

.form button[type="submit"][disabled] { opacity: 0.5; pointer-events: none; }

/* ── SENT CONFIRMATION ─────────────────────────────────────── */
.sent {
  border: var(--hair) solid var(--line);
  background: var(--surface);
  padding: var(--s-6) var(--s-5);
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4);
}
.sent__mark {
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  background: var(--flare); color: var(--flare-ink);
  font-size: 1.1rem;
}
.sent h3 {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 112, "wght" 780;
  text-transform: uppercase;
  letter-spacing: var(--tr-snug);
  font-size: var(--t-lg);
  line-height: 1.05;
}
.sent p { color: var(--ink-dim); font-size: var(--t-sm); line-height: 1.6; max-width: 40ch; }

@media (max-width: 620px) {
  .form { grid-template-columns: 1fr; }
  .field { grid-column: 1 / -1; }
}

/* ══════════════════════════════════════════════════════════════
   LOADER
   ══════════════════════════════════════════════════════════════ */
.boot {
  position: fixed; inset: 0;
  z-index: 300;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.55s var(--ease), visibility 0.55s;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.boot__inner {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--s-5);
  width: min(17rem, 62vw);
}

.boot__mark { width: 34px; height: 34px; color: var(--flare); }
.boot__mark .boot__core {
  transform-origin: 24px 24px;
  animation: bootPulse 1.5s var(--ease) infinite;
}
@keyframes bootPulse {
  0%, 100% { transform: rotate(0deg)   scale(1);    opacity: 1; }
  50%      { transform: rotate(180deg) scale(0.45); opacity: 0.45; }
}

.boot__bar {
  width: 100%;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.boot__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--flare);
}

.boot__pct {
  color: var(--ink-faint);
  font-size: var(--t-micro);
  letter-spacing: var(--tr-wider);
  font-variant-numeric: tabular-nums;
}
.boot__pct::after { content: "%"; margin-left: 0.15em; }
