/* Custom pieces that Tailwind's utility classes don't express well:
   grain texture, entrance/scroll animations, split-flap, boarding pass,
   ticket perforations, and manifest rows. Everything else (spacing,
   color, type) is Tailwind classes in index.html. */

html { scroll-behavior: smooth; }

body {
  position: relative;
}
/* subtle paper grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: #ffb100; color: #1b1712; }

.nav-link { position: relative; padding-bottom: 3px; transition: color 0.2s ease; }
.nav-link:hover { color: #ffb100; }
.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: #ffb100;
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }

a:focus-visible, button:focus-visible {
  outline: 2px solid #ffb100;
  outline-offset: 2px;
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb100;
  box-shadow: 0 0 8px #ffb100;
  display: inline-block;
}

/* ---------- Hero entrance ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.7s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.cursor-blink {
  color: #ffb100;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Departure board ---------- */
.board-cols,
.board-row {
  display: grid;
  grid-template-columns: 1.6fr 1.3fr 0.6fr 1.3fr 0.9fr;
  gap: 10px;
}
.board-row {
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #0a0d11;
  transition: background 0.2s ease;
}
.board-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.015);
}
.board-row:hover {
  background: rgba(255, 177, 0, 0.06);
}
.metric-name {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #e8e2d4;
}
.before-val {
  font-family: "Space Mono", monospace;
  font-size: 14px;
  color: #7d8790;
  text-decoration: line-through;
  text-decoration-color: #4a525a;
}
.arrow {
  font-family: "Space Mono", monospace;
  color: #556069;
  text-align: center;
  font-size: 13px;
}
.flap {
  position: relative;
  height: 26px;
  perspective: 300px;
}
.flap-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 15px;
  color: #8fe3c7;
  background: #1b232d;
  border-radius: 2px;
  padding: 0 8px;
  backface-visibility: hidden;
  transform: rotateX(90deg);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.6, 0, 0.4, 1), opacity 0.45s ease;
}
.board.flipped .flap-face {
  transform: rotateX(0deg);
  opacity: 1;
}
.impact {
  font-family: "Space Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  color: #2f2a20;
  background: #ffb100;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease 0.5s, transform 0.4s ease 0.5s;
}
.board.flipped .impact {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .board-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 10px;
  }
  .arrow {
    display: none;
  }
}

/* ---------- Project ticket stubs ---------- */
.stub {
  background: #fff;
  border: 1px solid #d9cdae;
  border-radius: 3px;
  position: relative;
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.reveal.in-view .stub {
  opacity: 1;
  transform: translateY(0);
}
.stub:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -18px rgba(27, 23, 18, 0.35);
  border-color: #c7b98f;
}
.stub::before,
.stub::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f5efe2;
  border: 1px solid #d9cdae;
}
.stub::before {
  left: -9px;
}
.stub::after {
  right: -9px;
}
.stub-tag {
  font-family: "Space Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #1f5f5b;
  border: 1px solid #1f5f5b;
  border-radius: 2px;
  padding: 3px 6px;
  white-space: nowrap;
}
.stub-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: "Space Mono", monospace;
  font-size: 10.5px;
  color: #5c5140;
  border-top: 1px dashed #d9cdae;
  padding-top: 12px;
  margin-top: auto;
}
.stub-stack span {
  background: #ece3cf;
  padding: 2px 7px;
  border-radius: 2px;
}

/* ---------- Boarding pass (AI & LLM tooling) ---------- */
.boarding-pass {
  display: grid;
  grid-template-columns: 1fr auto 220px;
  background: #10151c;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.5);
  color: #e8e2d4;
}
.bp-main {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.bp-top {
  display: flex;
  justify-content: space-between;
  font-family: "Space Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8f9aa3;
  border-bottom: 1px solid #242e39;
  padding-bottom: 12px;
}
.bp-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 22px;
}
.bp-fields > div { display: flex; flex-direction: column; gap: 3px; }
.bp-label {
  font-family: "Space Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffb100;
}
.bp-value {
  font-family: "Archivo", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  color: #e8e2d4;
}
.bp-value em { color: #8fe3c7; font-style: normal; font-size: 12px; }
.bp-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: #b7b0a0;
  border-top: 1px dashed #242e39;
  padding-top: 14px;
  margin: 0;
}
.bp-perforation {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 6px,
    #2a333d 6px,
    #2a333d 7px
  );
  width: 1px;
  padding: 20px 0;
}
.bp-perforation span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f5efe2;
  flex-shrink: 0;
}
.bp-stub {
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  background: #161d25;
}
.bp-stub .bp-value { font-size: 20px; color: #ffb100; }
.bp-barcode {
  margin-top: auto;
  height: 42px;
  background: repeating-linear-gradient(
    to right,
    #e8e2d4 0px, #e8e2d4 2px,
    transparent 2px, transparent 3px,
    #e8e2d4 3px, #e8e2d4 4px,
    transparent 4px, transparent 7px,
    #e8e2d4 7px, #e8e2d4 9px,
    transparent 9px, transparent 11px,
    #e8e2d4 11px, #e8e2d4 12px,
    transparent 12px, transparent 14px
  );
  border-radius: 1px;
}

@media (max-width: 720px) {
  .boarding-pass { grid-template-columns: 1fr; }
  .bp-perforation {
    flex-direction: row;
    width: auto;
    height: 1px;
    padding: 0 20px;
    background: repeating-linear-gradient(
      to right,
      transparent 0, transparent 6px,
      #2a333d 6px, #2a333d 7px
    );
  }
  .bp-fields { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .bp-fields { grid-template-columns: 1fr; }
}

/* ---------- Skills manifest ---------- */
.manifest-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  padding: 16px 30px;
  border-bottom: 1px solid #d9cdae;
  align-items: baseline;
  transition: background 0.2s ease;
}
.manifest-row:hover {
  background: #faf6ec;
}
.manifest-label {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b23b2e;
  font-weight: 700;
}
.manifest-items {
  font-size: 14.5px;
  line-height: 1.7;
  color: #33291d;
}
@media (max-width: 640px) {
  .manifest-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flap-face,
  .impact,
  .fade-up,
  .reveal,
  .stub,
  .cursor-blink {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
