/* ==========================================================================
   Kaio de Souza — portfolio
   Design tokens derived from the Nocturne design system (dark, blurple accent).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --color-bg: #161826;
  --color-bg-raised: #1a1c2c;
  --color-bg-deep: #101120;
  --color-surface: #232532;
  --color-section: #262a60;

  --color-text: #e9e9ed;
  --color-text-strong: rgba(233, 233, 237, 0.72);
  --color-text-muted: rgba(233, 233, 237, 0.6);
  --color-text-faint: rgba(233, 233, 237, 0.42);

  --color-accent: #9184d9;
  --color-accent-200: #e7e5fe;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-600: #796cbf;
  --color-accent-700: #5d5294;
  --color-accent-800: #423a6a;

  --color-line: rgba(233, 233, 237, 0.1);
  --color-line-strong: rgba(233, 233, 237, 0.12);

  --font-sans: "Inter", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1360px;
  --pad-x: clamp(20px, 4vw, 56px);
  --section-pad: clamp(72px, 10vw, 150px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* clears the sticky header, which is taller on small screens because the
     .nav-strip sits under it */
  scroll-padding-top: 116px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
}

p {
  margin: 0;
}

a {
  color: var(--color-accent-300);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-200);
}

img {
  display: block;
  max-width: 100%;
}

figure {
  margin: 0;
}

button {
  font: inherit;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

::selection {
  background: rgba(145, 132, 217, 0.3);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: #3f424d;
  border-radius: 8px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--color-accent-800);
  color: var(--color-accent-100, #f5f4ff);
  font-size: 13px;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 16px;
}

/* --------------------------------------------------------------------------
   3. Ambient layers — noise, cursor glow, custom cursor
   -------------------------------------------------------------------------- */
.noise {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%22200%22 height=%22200%22><filter id=%22n%22><feTurbulence type=%22fractalNoise%22 baseFrequency=%220.85%22 numOctaves=%224%22/></filter><rect width=%22200%22 height=%22200%22 filter=%22url(%23n)%22/></svg>');
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 620px;
  height: 620px;
  margin: -310px 0 0 -310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(145, 132, 217, 0.16), rgba(145, 132, 217, 0.05) 42%, transparent 70%);
  pointer-events: none;
  z-index: 2;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
  will-change: transform;
  transition:
    opacity 0.35s ease,
    width 0.28s var(--ease-out),
    height 0.28s var(--ease-out),
    margin 0.28s var(--ease-out),
    background-color 0.28s ease,
    border-color 0.28s ease;
}

.cursor-ring.is-hover {
  width: 62px;
  height: 62px;
  margin: -31px 0 0 -31px;
  background-color: rgba(145, 132, 217, 0.14);
  border-color: var(--color-accent-300);
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--color-accent-200);
  pointer-events: none;
  z-index: 61;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.35s ease;
}

body.has-cursor,
body.has-cursor * {
  cursor: none !important;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn--accent {
  border-color: var(--color-accent);
  color: var(--color-accent-200);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.btn--accent:hover {
  color: var(--color-accent-200);
  background: rgba(145, 132, 217, 0.14);
  box-shadow: 0 0 30px rgba(145, 132, 217, 0.28);
}

.btn--outline {
  border-color: rgba(233, 233, 237, 0.16);
  color: var(--color-text);
  transition: border-color 0.25s ease;
}

.btn--outline:hover {
  color: var(--color-text);
  border-color: rgba(233, 233, 237, 0.4);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 13px;
}

.btn--lg {
  padding: 18px 34px;
  font-size: 15px;
  gap: 12px;
}

.btn__arrow {
  font-size: 15px;
}

.btn--lg .btn__arrow {
  font-size: 17px;
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(22, 24, 38, 0.72);
  border-bottom: 1px solid rgba(233, 233, 237, 0.08);
}

.site-header__inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
}

.brand:hover {
  color: var(--color-text);
}

.brand__mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: none;
  transition: transform 0.4s var(--ease-out);
}

.brand:hover .brand__mark {
  transform: rotate(-4deg) scale(1.06);
}

.brand__mark-frame {
  opacity: 0.55;
  transition: opacity 0.35s ease;
}

.brand:hover .brand__mark-frame {
  opacity: 1;
}

.nav-links {
  display: none;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  color: var(--color-text-muted);
}

.nav-links a:hover {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Small-screen navigation. The inline .nav-links row is hidden below 900px,
   so this scrollable strip carries the section links there instead. */
.nav-strip {
  border-top: 1px solid rgba(233, 233, 237, 0.07);
}

.nav-strip__inner {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 11px;
  -webkit-overflow-scrolling: touch;
}

.nav-strip__inner::-webkit-scrollbar {
  display: none;
}

.nav-strip a {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(233, 233, 237, 0.55);
  white-space: nowrap;
}

.nav-strip a:hover {
  color: var(--color-text);
}

.lang-switch {
  display: flex;
  border: 1px solid rgba(233, 233, 237, 0.14);
  border-radius: 999px;
  padding: 2px;
}

.lang-btn {
  border: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: 999px;
  background: transparent;
  color: rgba(233, 233, 237, 0.45);
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn.is-active {
  background: rgba(145, 132, 217, 0.2);
  color: var(--color-accent-300);
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 130px) clamp(48px, 7vw, 96px);
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 56px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ee0a8;
  animation: pulse 2.4s ease-in-out infinite;
}

.hero__status-label,
.hero__status-location {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__status-label {
  color: rgba(233, 233, 237, 0.55);
}

.hero__status-location {
  color: rgba(233, 233, 237, 0.4);
}

.hero__status-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(233, 233, 237, 0.16), transparent);
}

.hero__title {
  font-size: clamp(46px, 10.5vw, 178px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-weight: 500;
  text-wrap: balance;
}

.hero__line {
  display: block;
  min-height: 0.9em;
}

.hero__line--serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-accent-300);
}

.hero__caret {
  display: inline-block;
  width: 0.045em;
  height: 0.62em;
  background: var(--color-accent);
  margin-left: 0.05em;
  opacity: 0;
}

.hero__caret.is-blinking {
  animation: blink 1.05s steps(1) infinite;
}

.hero__footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-top: clamp(36px, 5vw, 72px);
}

.hero__lede {
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.6;
  color: rgba(233, 233, 237, 0.68);
  max-width: 52ch;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   7. Logo ticker
   -------------------------------------------------------------------------- */
.ticker {
  border-top: 1px solid rgba(233, 233, 237, 0.08);
  border-bottom: 1px solid rgba(233, 233, 237, 0.08);
  overflow: hidden;
  padding: 22px 0;
  -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);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: marquee 44s linear infinite;
}

.ticker__track:hover {
  animation-play-state: paused;
}

.ticker__strip {
  display: flex;
  align-items: center;
  gap: clamp(38px, 5vw, 72px);
  padding-right: clamp(38px, 5vw, 72px);
  min-height: 26px;
}

.ticker__strip img {
  height: 26px;
  width: auto;
  flex: none;
  filter: grayscale(1) brightness(3);
  opacity: 0.34;
  transition: filter 0.4s ease, opacity 0.4s ease, transform 0.4s var(--ease-out);
}

.ticker__strip img:hover {
  filter: none;
  opacity: 1;
  transform: scale(1.12);
}

/* --------------------------------------------------------------------------
   8. Section shell — kicker rows, titles, reveal
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--section-pad);
}

.section--flush-top {
  padding-top: 0;
}

.kicker-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 52px);
}

.kicker-row__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-accent-400);
}

.kicker-row__rule {
  width: 36px;
  height: 1px;
  background: var(--color-accent-700);
  align-self: center;
}

.kicker-row__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(233, 233, 237, 0.5);
}

.section-title {
  font-size: clamp(34px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 500;
  margin-bottom: clamp(36px, 5vw, 72px);
  max-width: 16ch;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   9. Services
   -------------------------------------------------------------------------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: clamp(26px, 3vw, 42px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 320px;
  transition: background 0.35s ease, border-color 0.35s ease;
}

.service-card:hover {
  background: #1b1d2e;
  border-color: var(--color-accent-800);
}

.service-card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-accent-400);
}

.service-card__title {
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.service-card__body {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.service-card__spacer {
  flex: 1;
}

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-300);
  border: 1px solid var(--color-accent-800);
  background: rgba(145, 132, 217, 0.07);
  border-radius: 999px;
  padding: 5px 11px;
}

/* --------------------------------------------------------------------------
   10. Stat band

   Sits on the site's own dark ground rather than a separate indigo slab. The
   figures read as an editorial row — hairline-divided cells, no boxes — which
   matches the language of the stack and process rows further down.
   -------------------------------------------------------------------------- */
.stat-band {
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

/* a single soft bloom keeps the band from reading as a flat void */
.stat-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(110% 150% at 12% 0%, rgba(145, 132, 217, 0.11), transparent 62%);
}

.stat-band__inner {
  position: relative;
  padding-block: clamp(44px, 6vw, 84px);
}

.stat-band__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(28px, 3.4vw, 48px);
}

.stat-band__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(233, 233, 237, 0.5);
}

.stat-band__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(233, 233, 237, 0.18), transparent);
}

.stat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.stat-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 2.6vw, 30px) 0;
  border-top: 1px solid var(--color-line-strong);
  transition: border-color 0.4s ease;
}

.stat-cell:first-child {
  border-top: 0;
}

/* the accent hairline that grows in on hover, drawn over whichever edge
   currently divides the cells */
.stat-cell::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s var(--ease-out);
}

.stat-cell:hover::after {
  transform: scaleX(1);
}

.stat-cell__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: rgba(233, 233, 237, 0.38);
  transition: color 0.35s ease;
}

.stat-cell:hover .stat-cell__idx {
  color: var(--color-accent-300);
}

.stat-cell__value {
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(160deg, var(--color-text) 30%, var(--color-accent-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-cell__label {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(233, 233, 237, 0.6);
  max-width: 26ch;
}

@media (min-width: 620px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(24px, 3vw, 48px);
  }

  .stat-cell {
    border-top: 0;
    border-left: 1px solid var(--color-line-strong);
    padding-left: clamp(20px, 2.4vw, 34px);
  }

  .stat-cell:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .stat-cell::after {
    top: 0;
    left: -1px;
    width: 1px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: center top;
  }

  .stat-cell:hover::after {
    transform: scaleY(1);
  }

  .stat-cell:nth-child(odd)::after {
    display: none;
  }
}

@media (min-width: 1040px) {
  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* every cell but the first now carries the divider */
  .stat-cell:nth-child(odd) {
    border-left: 1px solid var(--color-line-strong);
    padding-left: clamp(20px, 2.4vw, 34px);
  }

  .stat-cell:nth-child(odd)::after {
    display: block;
  }

  .stat-cell:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .stat-cell:first-child::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   11. Projects
   -------------------------------------------------------------------------- */
/* Two columns rather than auto-fit: with exactly four projects, three columns
   leaves an orphan on its own row. */
.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 36px);
}

@media (min-width: 820px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: clamp(16px, 1.6vw, 22px);
  background: linear-gradient(180deg, #1a1c2c, #161826);
  transition: border-color 0.35s ease, transform 0.5s var(--ease-out);
}

.project-card:hover {
  border-color: var(--color-accent-700);
  transform: translateY(-4px);
}

/* Until real screenshots land the media box has to look deliberate rather
   than empty: a faint diagonal hatch plus an accent bloom in the corner. */
.project-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--color-bg-deep);
  background-image:
    radial-gradient(90% 120% at 85% 10%, rgba(145, 132, 217, 0.14), transparent 60%),
    repeating-linear-gradient(
      -45deg,
      rgba(233, 233, 237, 0.028) 0 1px,
      transparent 1px 9px
    );
  display: grid;
  place-items: center;
  transition: background-color 0.4s ease;
}

.project-card:hover .project-card__media {
  background-color: #14152a;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__index {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(233, 233, 237, 0.3);
  transition: color 0.35s ease;
}

.project-card:hover .project-card__index {
  color: var(--color-accent-300);
}

.project-card__placeholder {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(233, 233, 237, 0.3);
  text-align: center;
  padding: 16px;
  max-width: 26ch;
}

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-card__tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-300);
}

.project-card__year {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(233, 233, 237, 0.35);
}

.project-card__title {
  font-size: clamp(23px, 2.2vw, 31px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.project-card__body {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(233, 233, 237, 0.62);
  text-wrap: pretty;
}

.project-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(233, 233, 237, 0.08);
}

.metric-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: rgba(233, 233, 237, 0.55);
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  padding: 5px 11px;
  margin-top: 12px;
}

/* --------------------------------------------------------------------------
   12. Split sections — about, stack, education (sticky label + content)
   -------------------------------------------------------------------------- */
.statement {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: clamp(32px, 4vw, 56px);
  max-width: 26ch;
  text-wrap: pretty;
}

.fade-rule {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(233, 233, 237, 0.18) 48px,
    rgba(233, 233, 237, 0.18) calc(100% - 48px),
    transparent
  );
  margin-bottom: clamp(32px, 4vw, 56px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
}

.split__label {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.split__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.split__rule {
  width: 36px;
  height: 1px;
  background: var(--color-accent-700);
}

.split__note {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(233, 233, 237, 0.35);
  max-width: 20ch;
}

.split__body {
  display: flex;
  flex-direction: column;
  max-width: 66ch;
  margin-left: auto;
  width: 100%;
}

.split__body--about {
  gap: clamp(26px, 3.4vw, 48px);
}

.lead-p {
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.65;
  color: var(--color-text-strong);
  text-indent: 5em;
  text-wrap: pretty;
}

.audience-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audience-item__title {
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.audience-item__body {
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--color-text-muted);
  margin-left: clamp(24px, 4vw, 72px);
  text-wrap: pretty;
}

/* Portrait as a film frame: the clip-path opens from a centred band and the
   photo drifts inside it, both scrubbed from main.js. The resting values here
   are the finished state, so no JS means a plain, fully visible image. */
.about-portrait {
  position: relative;
  width: 100%;
}

.about-portrait__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-bg-deep);
}

.about-portrait__frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  pointer-events: none;
  background: linear-gradient(transparent, var(--color-bg));
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-portrait-on .about-portrait__frame {
  will-change: clip-path;
}

.about-portrait-on .about-portrait img {
  will-change: transform;
}

/* — stack rows —
   Title left, technologies right, on one line. The mono list is allowed to
   wrap internally but must not push itself onto its own row, so nothing here
   sets a max-width that would force a break. */
.stack-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
  padding: clamp(18px, 2.2vw, 26px) 0;
  border-top: 1px solid var(--color-line-strong);
  transition: padding-left 0.45s var(--ease-out), border-color 0.35s ease;
}

.stack-row:hover {
  padding-left: 14px;
  border-color: var(--color-accent-600);
}

.stack-row__title {
  flex: 0 0 auto;
  font-size: clamp(17px, 1.6vw, 21px);
  letter-spacing: -0.015em;
}

.stack-row__line {
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(233, 233, 237, 0.55);
  text-align: right;
  min-width: 0;
}

.row-list__end {
  height: 1px;
  background: var(--color-line-strong);
}

/* — timeline (education) —
   Mirrors the process rows' three-column rhythm so sections 05 and 06 line up,
   with a rail and dots down the left marking it as a chronology. */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: clamp(22px, 3vw, 34px) 0 clamp(22px, 3vw, 34px) 26px;
  transition: background 0.35s ease;
}

.timeline-row:hover {
  background: rgba(145, 132, 217, 0.045);
}

/* the rail: full height, trimmed back to the dot on the first and last rows
   so the line begins and ends on a marker rather than in mid-air */
.timeline-row::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-line-strong);
}

.timeline-row:first-child::before {
  top: clamp(26px, 3vw, 38px);
}

.timeline-row:last-child::before {
  bottom: auto;
  height: clamp(26px, 3vw, 38px);
}

.timeline-row__dot {
  position: absolute;
  left: 0;
  top: clamp(23px, 3vw, 35px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  background: var(--color-bg);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.timeline-row:hover .timeline-row__dot {
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(145, 132, 217, 0.18);
}

.timeline-row__when {
  display: flex;
  align-items: baseline;
}

.timeline-row__period {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--color-accent-300);
}

.timeline-row__title {
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.timeline-row__detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.timeline-row__body {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 60ch;
  text-wrap: pretty;
}

@media (min-width: 760px) {
  .timeline-row {
    grid-template-columns: minmax(76px, 110px) minmax(180px, 1.1fr) minmax(0, 2fr);
    gap: clamp(16px, 3vw, 44px);
    align-items: start;
    padding-left: 34px;
  }

  .timeline-row__when,
  .timeline-row__title,
  .timeline-row__detail {
    padding-top: 10px;
  }
}

.about {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 64px);
}

/* --------------------------------------------------------------------------
   12b. About section scroll effects

   Two independent enhancements, both driven from main.js and both opt-in via
   a root class so the section degrades to plain stacked text when JS is
   absent, the viewport is narrow, or the visitor prefers reduced motion.

     .about-pin-on   the opening stage sticks while the statement lights up
                     character by character, scrubbed against scroll progress
     .about-slide-on blocks below travel in from the right as they rise
   -------------------------------------------------------------------------- */
.about-track {
  position: relative;
}

.about-theses {
  margin-top: clamp(28px, 4vw, 64px);
}

.about-theses .split__body {
  gap: clamp(26px, 3.4vw, 48px);
}

/* the empty cell only exists to hold the theses under the paragraphs on the
   two-column layout; on one column it would just add a gap */
.about-theses .split > [aria-hidden] {
  display: none;
}

/* the portrait's lighten blend already fades the section out — no need to
   pad below it as well */
.about {
  padding-bottom: 0;
}

/* — pinned opening stage — */
.about-pin-on .about-track {
  height: calc(100vh + var(--about-dwell, 110vh));
}

.about-pin-on .about-stage {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: clamp(88px, 12vh, 132px);
  padding-bottom: clamp(40px, 7vh, 80px);
}

.about-pin-on .about-stage > .container {
  width: 100%;
}

/* — character reveal —
   Words stay unbreakable so splitting into per-character spans cannot break
   a word across lines; the spaces between them are plain text nodes. */
.rw {
  white-space: nowrap;
}

.about-chars-on .statement .rc {
  color: rgba(233, 233, 237, 0.32);
  transition: color 0.4s ease;
}

.about-chars-on .statement .rc.is-lit {
  color: var(--color-text);
}

/* — slide-in blocks —
   The inline transform/opacity written by JS takes over from here; this only
   sets the pre-scroll resting state so nothing flashes in at full opacity. */
.about-slide-on [data-slide] {
  opacity: 0;
  transform: translate3d(90px, 0, 0);
  will-change: transform, opacity;
}

/* --------------------------------------------------------------------------
   13. Process
   -------------------------------------------------------------------------- */
/* Single column by default. The three-column form needs roughly 760px before
   its track minimums stop overflowing a phone. */
.process-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: clamp(22px, 3vw, 38px) 0;
  border-top: 1px solid var(--color-line-strong);
  transition: background 0.35s ease;
}

.process-row:hover {
  background: rgba(145, 132, 217, 0.045);
}

.process-row__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-accent-400);
}

.process-row__title {
  font-size: clamp(20px, 2.4vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.process-row__body {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 60ch;
  text-wrap: pretty;
}

@media (min-width: 760px) {
  .process-row {
    grid-template-columns: minmax(76px, 110px) minmax(180px, 1.1fr) minmax(0, 2fr);
    gap: clamp(16px, 3vw, 44px);
    align-items: start;
  }

  .process-row__num {
    padding: 10px;
  }

  .process-row__title,
  .process-row__body {
    padding: 10px 0;
  }
}

/* --------------------------------------------------------------------------
   14. Contact
   -------------------------------------------------------------------------- */
.contact {
  position: relative;
  border-top: 1px solid var(--color-line);
  background-image: radial-gradient(90% 120% at 50% 100%, rgba(145, 132, 217, 0.14), transparent 65%);
}

.contact__title {
  font-size: clamp(38px, 8.5vw, 142px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin-bottom: clamp(28px, 4vw, 52px);
  max-width: 13ch;
}

.contact__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent-300);
}

.contact__body {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.65;
  color: rgba(233, 233, 237, 0.65);
  max-width: 52ch;
  margin-bottom: clamp(32px, 4vw, 48px);
  text-wrap: pretty;
}

.contact__channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  margin-top: clamp(52px, 7vw, 96px);
  padding-top: 32px;
  border-top: 1px solid var(--color-line-strong);
}

.channel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.channel__value {
  font-size: 15px;
  color: var(--color-text);
}

.channel__value:hover {
  color: var(--color-accent-300);
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-line);
}

.site-footer__inner {
  padding-block: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.site-footer__inner span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(233, 233, 237, 0.4);
}

/* --------------------------------------------------------------------------
   16. Animations
   -------------------------------------------------------------------------- */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.75); }
}

@keyframes blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* --------------------------------------------------------------------------
   17. Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 900px) {
  html {
    scroll-padding-top: 84px;
  }

  .nav-links {
    display: flex;
  }

  /* the inline nav takes over — the strip would just duplicate it */
  .nav-strip {
    display: none;
  }

  .split {
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  }

  .split__label {
    position: sticky;
    top: 96px;
  }

  /* inside the pinned stage the label rides along, so sticky would fight it */
  .about-pin-on .about-stage .split__label {
    position: static;
  }

  .about-theses .split > [aria-hidden] {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   18. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ticker__track {
    animation-duration: 120s;
  }

  .status-dot {
    animation: none;
  }
}