/* ==========================================================================
   Profile Spine + Dual Drift & Contact States
   ========================================================================== */

:root {
  --bg: #0b0b0d;
  --surface: #131316;
  --surface-elevated: #1b1b20;
  --ink: #eceae4;
  --ink-muted: #7c7a74;
  --ink-faint: #4c4b47;
  --rule: rgba(236, 234, 228, 0.12);
  --font-sans: "Inter", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --font-serif: "Newsreader", "Georgia", serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

:focus-visible {
  outline: 1px solid rgba(236, 234, 228, 0.55);
  outline-offset: 4px;
}

/* ---------- Continuous Spine Shell ---------- */
.page-shell {
  display: grid;
  grid-template-columns: 76px 1fr;
  min-height: 100vh;
}

.spine {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-muted);
}

.spine__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

.spine__nav a {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-faint);
  transition: color 0.25s ease, transform 0.25s ease;
}

.spine__nav a:hover,
.spine__nav a.is-active {
  color: var(--ink);
}

.spine__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.85;
}

.main-flow {
  min-width: 0; /* Prevents flex/grid blowout from marquee track */
}

/* ---------- Band 01: Panoramic Hero ---------- */
.hero-stage {
  min-height: 88vh;
  padding: 3.5rem 4rem 4rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
}

.hero-stage__panorama {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 720px;
  height: 60vh;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.hero-stage__panorama::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(11, 11, 13, 0.12) 0%,
    rgba(11, 11, 13, 0.05) 45%,
    rgba(11, 11, 13, 0.55) 100%
  );
}

.hero-stage__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 42%;
  filter: grayscale(100%) contrast(1.08) brightness(0.88);
}

.hero-stage__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.hero-stage__name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-stage__meta {
  min-width: 280px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-meta-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.hero-meta-line--lead {
  color: var(--ink);
}

/* ---------- Band 02: Edge-Masked Dual Drift (Skills) ---------- */
.skills-band {
  padding: 5.5rem 4rem;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.skills-band__kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ribbon-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.ribbon-track {
  display: flex;
  align-items: baseline;
  gap: 3.5rem;
  white-space: nowrap;
  width: max-content;
  animation: quiet-drift 54s linear infinite;
}

.ribbon-track--reverse {
  animation-direction: reverse;
  animation-duration: 64s;
}

.ribbon-term {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 400;
  color: var(--ink);
}

.ribbon-term--muted {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@keyframes quiet-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ribbon-track {
    animation: none;
  }
}

/* ---------- Band 03: Continuous Editorial Stream (Resorts & Clients) ---------- */
.clients-band {
  padding: 5.5rem 4rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.clients-band__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
}

.clients-band__count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-muted);
}

.prose-archive {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  line-height: 1.7;
  color: var(--ink);
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.prose-archive .dot {
  color: var(--ink-muted);
  margin: 0 0.65rem;
  font-family: var(--font-sans);
  font-size: 1.15em;
  font-weight: 600;
}

.prose-archive .more {
  color: var(--ink-muted);
  font-style: italic;
}

/* ---------- Band 04: Typographic Scale Growth Timeline (2017 — 2025) ---------- */
.timeline-band {
  padding: 5.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.evo-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.evo-item {
  display: flex;
  align-items: baseline;
  gap: 2.25rem;
}

.evo-yr {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  min-width: 110px;
}

.evo-1 { font-size: 1rem; color: var(--ink-faint); }
.evo-2 { font-size: 1.35rem; color: var(--ink-muted); }
.evo-3 { font-size: 1.85rem; color: rgba(236, 234, 228, 0.78); font-family: var(--font-serif); }
.evo-4 { font-size: clamp(2.1rem, 3.8vw, 3.1rem); color: var(--ink); font-family: var(--font-serif); line-height: 1.05; }

/* ---------- Band 05: Quiet Recognition (Centered Stamp + Pull-Quote) ---------- */
.recognition-band {
  padding: 6rem 4rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.dispatch-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: center;
}

.dispatch-stamp {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(236, 234, 228, 0.24);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.dispatch-body {
  border-left: 1px solid rgba(236, 234, 228, 0.24);
  padding-left: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pq-quote {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.8vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.pq-highlight {
  font-style: italic;
  border-bottom: 1px solid rgba(236, 234, 228, 0.28);
  padding-bottom: 0.05em;
}

.pq-attr {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
}

/* ---------- Band 06: Inline Editorial Contact + OTP States ---------- */
.contact-band {
  padding: 6rem 4rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 3rem;
  transition: opacity 0.15s ease;
}

.contact-band[aria-busy="true"] {
  opacity: 0.72;
}

.sentence-form {
  max-width: 860px;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.75;
  color: var(--ink-muted);
}

.inline-field {
  display: inline-block;
  width: 220px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(236, 234, 228, 0.28);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: inherit;
  color: var(--ink);
  padding: 0 0.25rem;
  margin: 0 0.25rem;
  outline: none;
}

.inline-field::placeholder {
  color: var(--ink-faint);
}

.inline-field:focus {
  border-bottom-color: var(--ink);
}

.inline-field--locked {
  display: inline-block;
  font-style: italic;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding: 0 0.35rem;
  margin: 0 0.25rem;
  opacity: 0.72;
}

.min-submit {
  margin-top: 2.25rem;
  background: transparent;
  border: 1px solid rgba(236, 234, 228, 0.28);
  color: var(--ink);
  padding: 0.85rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.min-submit:hover {
  background: var(--ink);
  color: var(--bg);
}

.min-submit:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* OTP Confirmation State (Post-Submit) */
.otp-state {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.otp-state__prompt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.otp-digits {
  display: flex;
  gap: 1rem;
}

.otp-slot {
  width: 44px;
  height: 52px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(236, 234, 228, 0.28);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--ink);
  outline: none;
}

.otp-slot:focus {
  border-bottom-color: var(--ink);
}

.otp-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.otp-actions .min-submit {
  margin-top: 0;
}

.otp-resend {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s ease;
}

.otp-resend:hover {
  color: var(--ink);
}

/* Rate-Limit / Status / Confirmation Stamps */
.err-stamp-grid {
  max-width: 680px;
  display: grid;
  grid-template-columns: auto 1px 1fr;
  gap: 2rem;
  align-items: center;
}

.err-stamp-grid--inline {
  margin-top: 2rem;
}

.err-stamp {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(224, 138, 75, 0.35);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e08a4b;
}

.err-stamp-div {
  width: 1px;
  height: 36px;
  background: var(--rule);
}

.err-stamp-msg {
  font-size: 0.95rem;
  color: #e08a4b;
}

.ok-stamp {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(111, 168, 124, 0.4);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6fa87c;
}

.ok-stamp-msg {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: #6fa87c;
}

.contact-reset-row {
  display: flex;
  align-items: center;
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(236, 234, 228, 0.18);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(236, 234, 228, 0.32);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: thin;
    scrollbar-color: rgba(236, 234, 228, 0.18) transparent;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .spine {
    display: none;
  }

  .hero-stage {
    padding: 2.5rem 1.5rem;
    min-height: auto;
  }

  .hero-stage__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .skills-band,
  .clients-band,
  .timeline-band,
  .recognition-band,
  .contact-band {
    padding: 3.5rem 1.5rem;
  }

  .inline-field {
    width: 100%;
    margin: 0.25rem 0;
  }

  .otp-digits {
    gap: 0.6rem;
  }

  .otp-slot {
    width: 36px;
  }

  .evo-item {
    flex-direction: column;
    gap: 0.35rem;
  }

  .dispatch-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .dispatch-body {
    border-left: none;
    padding-left: 0;
  }

  .err-stamp-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .err-stamp-div {
    display: none;
  }
}
