/* ==========================================================
   Bunyod Baxodirzoda | Portfolio styles
   1. Tokens & themes   2. Base   3. Background   4. Header
   5. Components        6. Sections   7. Letter styles   8. Motion
   ========================================================== */

/* ---------- 1. Tokens & themes ---------- */
:root {
  --bg: #f4f3ef;
  --panel: #ffffff8c;
  --panel-solid: #fff;
  --ink: #0b0b0b;
  --muted: #6c6a65;
  --line: #0b0b0b24;
  --accent: #c4262e;
  --accent-ink: #fff;
  --logo: #8c1118;
  --line-solid: color-mix(in srgb, var(--ink) 15%, var(--bg));

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 8px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #050505;
  --panel: #ffffff0d;
  --panel-solid: #121212;
  --ink: #f3f2ee;
  --muted: #8f8d88;
  --line: #f3f2ee26;
  --accent: #ff5a5f;
  --accent-ink: #050505;
  --logo: #ff6b70;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) {
    scroll-behavior: smooth;
  }
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  transition:
    background 0.4s var(--ease),
    color 0.4s var(--ease);
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus,
[tabindex="-1"]:focus {
  outline: none;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.h-xl {
  font-size: clamp(2.1rem, 5.2vw, 4.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.h-lg {
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.lead {
  max-width: 34em;
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}

.skip-link:focus {
  transform: none;
}

/* ---------- 3. Background: dot grid, cursor light, grain ---------- */
.bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid,
.bg-lit,
.bg-grain {
  position: absolute;
  inset: 0;
}

.bg-grid {
  background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 30%, transparent) 1px, transparent 1.4px);
  background-size: 30px 30px;
  opacity: 0.22;
}

/* Dots light up around the cursor (--mx / --my are set from JS) */
.bg-lit {
  background-image: radial-gradient(circle, var(--ink) 1.2px, transparent 1.8px);
  background-size: 30px 30px;
  opacity: 0.85;
  -webkit-mask-image: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 28%), #000 0%, transparent 100%);
  mask-image: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 28%), #000 0%, transparent 100%);
}

.bg-grain {
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

:root:not([data-theme="dark"]) .bg-grain {
  opacity: 0.12;
  filter: invert(1);
}

/* ---------- 4. Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 24px;
  height: 30px;
  color: var(--logo);
}

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

.nav-link {
  position: relative;
  padding: 6px 0;
  font-size: 15px;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}

.nav-link:hover::after,
.nav-link[aria-current]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-tools {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.clock {
  display: none;
  margin-right: 4px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding-inline: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: none;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s;
}

.icon-btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.lang-switch button {
  min-width: 36px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s;
}

.lang-switch button + button {
  border-left: 1px solid var(--line);
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.no-js .lang-switch,
.no-js .theme-btn,
.no-js .clock,
.no-js .hint,
.no-js .show-count,
.no-js .progress,
.no-js .show .browser {
  display: none;
}

.no-js .show-pin {
  position: static;
  display: block;
  height: auto;
  padding-top: 0;
}

/* Mobile menu (a <details> element, so it also works without JS) */
.menu {
  position: relative;
}

.menu summary {
  list-style: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu[open] summary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.menu-panel {
  position: absolute;
  right: 0;
  margin-top: 12px;
  width: 13rem;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  box-shadow: 0 30px 60px -30px #0009;
}

.menu-panel a {
  display: block;
  padding: 8px 0;
  font-size: 1.125rem;
}

.menu-panel a:hover {
  color: var(--accent);
}

@media (max-width: 639.98px) {
  .brand-name {
    display: none;
  }
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .menu {
    display: none;
  }
}

@media (min-width: 1100px) {
  .clock {
    display: inline;
  }
}

/* ---------- 5. Components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--bg);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s,
    transform 0.4s var(--ease);
}

.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn:active {
  transform: translateY(1px);
}

.btn-ghost {
  border-color: var(--line);
  background: none;
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn-sm {
  padding: 10px 16px;
  font-size: 15px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.dot {
  width: 7px;
  height: 7px;
  background: #35c47c;
  animation: blink 2.4s ease-in-out infinite;
}

.chip {
  position: relative;
  top: -0.06em;
  display: inline-block;
  padding: 0.02em 0.32em 0.08em;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.74em;
  letter-spacing: -0.02em;
  vertical-align: middle;
}

.label {
  margin-bottom: 32px;
}

.ico {
  display: inline-block;
  flex: none;
  vertical-align: -0.14em;
}

/* List rows that fill with ink on hover */
.rows {
  border-bottom: 1px solid var(--line);
}

.row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  transition:
    padding 0.5s var(--ease),
    color 0.3s;
}

a.row::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * var(--gutter));
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
}

a.row:hover,
a.row:focus-visible {
  color: var(--bg);
  padding-inline: 14px;
}

a.row:hover::before,
a.row:focus-visible::before {
  transform: scaleY(1);
}

a.row:hover .muted,
a.row:hover .mono,
a.row:focus-visible .muted,
a.row:focus-visible .mono {
  color: color-mix(in srgb, var(--bg) 65%, transparent);
}

.row .arrow {
  font-size: 1.875rem;
  line-height: 1;
  transition: transform 0.5s var(--ease);
}

a.row:hover .arrow,
a.row:focus-visible .arrow {
  color: var(--accent);
  transform: rotate(45deg);
}

.row-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-title .ico {
  width: 0.9em;
  height: 0.9em;
}

.row-side {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* A contact link that has not been added yet: muted, not clickable */
.row.is-empty .row-title {
  color: var(--muted);
}

.row.is-empty .row-title .ico {
  opacity: 0.45;
  filter: grayscale(1);
}

@media (max-width: 640px) {
  .row {
    grid-template-columns: 1fr auto;
  }

  .row > :first-child {
    display: none;
  }
}

/* Reveal on scroll (only hidden when JS is running) */
.js .reveal {
  opacity: 0;
  filter: blur(6px);
  transform: translateY(24px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease),
    filter 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}

.js .reveal.in {
  opacity: 1;
  filter: none;
  transform: none;
}

/* ---------- 6. Sections ---------- */
.section {
  padding-top: clamp(96px, 12vw, 128px);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-lead {
  margin-top: 24px;
}

/* Hero */
.hero {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 120px 0 70px;
  text-align: center;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 14px;
}

.meta b {
  color: var(--ink);
  font-weight: 500;
}

.hero-title {
  margin-top: 26px;
  font-size: clamp(3.4rem, 12vw, 10.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-title [data-line] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Letters of one word (built by JS) wrap together, never mid-word */
.hero-title .hw {
  display: inline-flex;
  white-space: nowrap;
}

@media (max-width: 359.98px) {
  .hero-title {
    font-size: 14vw;
  }
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin-top: 28px;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.hero-roles .sep {
  color: var(--accent);
}

/* On phones the roles stack, so a wrapped line never ends with "|" */
@media (max-width: 599.98px) {
  .hero-roles {
    flex-direction: column;
    gap: 2px;
  }

  .hero-roles .sep {
    display: none;
  }
}

.hero-sub {
  max-width: 30em;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.hint {
  margin-top: 48px;
}

@media (hover: none), (prefers-reduced-motion: reduce) {
  .hint {
    display: none;
  }
}

/* About */
.section-about {
  padding-block: 96px 0;
}

.scrub-text {
  font-size: clamp(1.7rem, 4.4vw, 3.7rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.about-more {
  margin-top: 40px;
}

.facts-grid {
  display: grid;
  gap: 1px;
  margin-top: 64px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--line);
}

.facts-grid > div {
  padding: clamp(24px, 3vw, 40px);
  background: var(--bg);
  transition: background 0.4s var(--ease);
}

.facts-grid .muted {
  margin-top: 12px;
}

.fact {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

@media (min-width: 640px) {
  .facts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Skills: cells separated by hairlines, like the facts grid */
.group-label {
  margin: 56px 0 18px;
}

/* Hairlines come from each cell's 1px shadow, so an empty slot in the
   last row (e.g. 3 tools in 2 columns) stays plain instead of grey. */
.cell-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  transition: background 0.4s var(--ease);
}

.cell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(22px, 2.6vw, 32px);
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line-solid);
  transition: background 0.4s var(--ease);
}

.cell:hover {
  background: color-mix(in srgb, var(--ink) 5%, var(--bg));
}

.cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cell-top .ico {
  width: 30px;
  height: 30px;
  transition: transform 0.6s var(--ease);
}

.cell:hover .cell-top .ico {
  transform: rotate(-8deg) scale(1.12);
}

.cell .muted {
  font-size: 15px;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .cols-4,
  .cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Velocity marquee: speeds up with scroll velocity */
.vm {
  padding-top: clamp(96px, 12vw, 128px);
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.vm-row {
  display: flex;
  width: max-content;
  will-change: transform;
}

.vm-row span {
  display: inline-flex;
  align-items: center;
  padding-right: 0.5em;
  font-size: clamp(3.4rem, 11vw, 9.5rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.06em;
  white-space: nowrap;
}

.vm-row .ico {
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.12em;
}

.vm-row.out span {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}

/* Projects: pinned showcase that steps through projects on scroll */
.show {
  position: relative;
  margin-top: 48px;
}

.show-pin {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  height: 100svh;
  padding-top: 70px;
}

.show-count {
  margin-bottom: 24px;
}

.steps {
  display: grid;
}

.step {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition:
    opacity 0.25s,
    transform 0.25s;
}

.step.on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition:
    opacity 0.7s var(--ease) 0.25s,
    transform 0.9s var(--ease) 0.25s;
}

.step-tag {
  margin-bottom: 18px;
}

.step-tag .tag-part {
  white-space: nowrap;
}

.step-tag .placeholder {
  color: var(--accent);
}

.step h3 {
  font-size: clamp(2.3rem, 5.2vw, 4.6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.step .lead {
  margin-top: 20px;
}

.is-placeholder .step-desc {
  font-style: italic;
}

.step-meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.step-thumb {
  display: none;
}

.progress {
  display: flex;
  gap: 6px;
  margin-top: 32px;
}

.progress i {
  width: 32px;
  height: 2px;
  background: var(--line);
  transition:
    background 0.4s,
    width 0.5s var(--ease);
}

.progress i.on {
  width: 60px;
  background: var(--accent);
}

/* Browser frame that shows the current project's screenshot */
.browser {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-solid);
  box-shadow: 0 50px 90px -30px #0009;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.browser-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}

.browser-url {
  flex: 1;
  min-width: 0;
  margin-left: 10px;
  padding: 4px 10px;
  overflow: hidden;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0e0e0e;
}

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  clip-path: inset(100% 0 0);
  transition: clip-path 0.9s var(--ease);
}

.screen.on {
  clip-path: inset(0);
}

@media (max-width: 760px) {
  .show-pin {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 24px;
  }

  .browser {
    order: -1;
    justify-self: center;
    width: min(100%, max(160px, calc((100vh - 440px) * 1.6)));
    width: min(100%, max(160px, calc((100svh - 440px) * 1.6)));
  }

  .show-count {
    margin-bottom: 14px;
  }

  .step .lead {
    margin-top: 12px;
    font-size: 1rem;
  }

  .step-meta {
    margin-top: 16px;
    gap: 12px;
  }

  .progress {
    margin-top: 20px;
  }
}

/* Static list of projects: used with reduced motion or if the
   animation library is unavailable. */
.show.is-static {
  height: auto !important;
}

.show.is-static .show-pin {
  position: static;
  display: block;
  height: auto;
  padding-top: 0;
}

.show.is-static .show-count,
.show.is-static .progress,
.show.is-static .browser {
  display: none;
}

.show.is-static .steps {
  display: block;
}

.show.is-static .step {
  display: grid;
  gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.show.is-static .step-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
}

@media (min-width: 761px) {
  .show.is-static .step {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(24px, 5vw, 80px);
  }
}

/* Contact */
.section-contact {
  padding-top: clamp(120px, 14vw, 160px);
}

.cta-title {
  font-size: clamp(1.9rem, 5.6vw, 4.6rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.cta-mail {
  display: inline-block;
  word-break: break-all;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition:
    background-size 0.6s var(--ease),
    color 0.3s;
}

.cta-mail:hover {
  color: var(--accent);
  background-size: 100% 2px;
}

.contact-lead {
  margin-top: 28px;
}

.contact-rows {
  margin-top: 56px;
}

/* Footer */
.site-footer {
  margin-top: clamp(96px, 12vw, 128px);
  padding-block: 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links .ico {
  width: 14px;
  height: 14px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-links {
    margin-left: auto;
  }
}

/* ---------- 7. Hero letters & the display fonts they swap to ---------- */
/* Each letter keeps the box size measured in Geist (set by JS), so a swapped
   display-font glyph never changes the layout; it is centred and may overflow. */
.ch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: pre;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  will-change: transform;
}

.ch.sk {
  font-size: calc(var(--s, 1) * 1.14em);
}

.sk {
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

.sk-0 { --s: 1; font-family: "Nabla", system-ui; }
.sk-1 { --s: 1; font-family: "Honk", system-ui; }
.sk-2 { --s: 0.9; font-family: "Bungee Spice", system-ui; }
.sk-3 { --s: 0.85; color: #ff7a1a; font-family: "Bungee Shade", system-ui; }
.sk-4 { --s: 0.8; color: #ff3d9a; text-shadow: 0 0 0.18em #ff3d9a, 0 0 0.5em #ff3d9a99; font-family: "Monoton", system-ui; }
.sk-5 { --s: 0.85; color: #ffd23f; font-family: "Faster One", system-ui; }
.sk-6 { --s: 0.9; color: #f2f2f2; font-family: "Rubik Glitch", system-ui; }
.sk-7 { --s: 0.95; color: #5fd8ff; font-family: "Rubik Wet Paint", system-ui; }
.sk-8 { --s: 0.95; color: #ff6a2a; font-family: "Rubik Spray Paint", system-ui; }
.sk-9 { --s: 0.95; color: #ffb347; font-family: "Rubik Burned", system-ui; }
.sk-10 { --s: 0.95; color: #7cf0b4; font-family: "Rubik Bubbles", system-ui; }
.sk-11 { --s: 0.7; padding: 0.06em 0.14em 0.02em; color: #111; background: #ffe14a; box-shadow: 0.04em 0.05em #00000073; font-family: "Rubik Mono One", system-ui; transform: rotate(-3deg); }
.sk-12 { --s: 0.85; padding: 0.04em 0.14em; color: #14110d; background: #f3ece0; box-shadow: 0.03em 0.05em #0006; font-family: "Abril Fatface", serif; transform: rotate(2.5deg); }
.sk-13 { --s: 0.8; padding: 0.06em 0.16em; color: #26221c; background: #e6dcc3; box-shadow: 0.03em 0.05em #0006; font-family: "Special Elite", monospace; transform: rotate(-2deg); }
.sk-14 { --s: 0.55; padding: 0.18em 0.22em 0.12em; color: #39ff14; background: #06130a; outline: 0.05em solid #39ff14; font-family: "Press Start 2P", monospace; }
.sk-15 { --s: 0.85; color: #d8c66a; font-family: "Black Ops One", system-ui; }
.sk-16 { --s: 0.9; color: #ff4d5e; font-family: "Permanent Marker", cursive; transform: rotate(-5deg); }
.sk-17 { --s: 1; color: #ece5cf; font-family: "UnifrakturCook", serif; font-weight: 700; }
.sk-18 { --s: 1; color: #ffb020; text-shadow: 0 0.04em #d9780a, 0 0.08em #a85200, 0 0.12em #6b3300, 0 0.17em 0.06em #00000073; font-family: "Modak", system-ui; }
.sk-19 { --s: 0.9; color: #ffd84a; -webkit-text-stroke: 0.025em #b97a00; text-shadow: 0 0.05em #b97a00, 0 0.09em #7a4e00, 0 0.13em 0.05em #0006; font-family: "Bagel Fat One", system-ui; }
.sk-20 { --s: 0.95; color: #b78cff; font-family: "Tilt Prism", system-ui; }
.sk-21 { --s: 0.95; color: #4de1c1; font-family: "Foldit", system-ui; }
.sk-22 { --s: 0.7; color: #ffe94d; font-family: "Sixtyfour", monospace; }
.sk-23 { --s: 1.05; color: #ff8fb8; font-family: "Londrina Shadow", system-ui; }
.sk-24 { --s: 0.8; color: #ff5a1f; font-family: "Climate Crisis", system-ui; }
.sk-25 { --s: 0.9; color: #ffb3d9; text-shadow: 0.04em 0.05em #c2185b; font-family: "Shrikhand", serif; }
.sk-26 { --s: 1; color: #fff; -webkit-text-stroke: 0.1em #111; paint-order: stroke fill; text-shadow: 0 0.05em #111; font-family: "Lilita One", system-ui; }
.sk-27 { --s: 0.9; color: #ffe600; -webkit-text-stroke: 0.08em #111; paint-order: stroke fill; text-shadow: 0.04em 0.05em #e5005a; font-family: "Luckiest Guy", system-ui; }
.sk-28 { --s: 0.95; color: #f3f2ee; font-family: "Kumar One Outline", system-ui; }
.sk-29 { --s: 0.85; color: #3de2ff; font-family: "Bungee Inline", system-ui; }
.sk-30 { --s: 0.95; color: #f6f1e7; font-family: "Rubik Marker Hatch", system-ui; }
.sk-31 { --s: 0.95; color: #78ffd6; text-shadow: 0 0 0.15em #78ffd6, 0 0 0.45em #78ffd68c; font-family: "Tilt Neon", system-ui; }
.sk-32 { --s: 0.85; color: #fff; text-shadow: 0.05em 0.06em #ff3d71, 0.1em 0.12em #7a1b3b; font-family: "Bowlby One", system-ui; }
.sk-33 { --s: 0.95; color: #ff9fd0; font-family: "Emilys Candy", system-ui; }
.sk-34 { --s: 0.8; color: #e2b86a; text-shadow: 0.04em 0.05em #5b3a12; font-family: "Rye", serif; }
.sk-35 { --s: 0.9; color: #ff6b6b; font-family: "Fascinate Inline", system-ui; }

/* Light theme: the near-white letter styles need dark ink to stay visible */
:root:not([data-theme="dark"]) .sk-6,
:root:not([data-theme="dark"]) .sk-17,
:root:not([data-theme="dark"]) .sk-28,
:root:not([data-theme="dark"]) .sk-30 {
  color: var(--ink);
}

/* …and the pale pastel ones get a thin dark outline */
:root:not([data-theme="dark"]) :is(.sk-5, .sk-7, .sk-10, .sk-15, .sk-21, .sk-22, .sk-29, .sk-31) {
  -webkit-text-stroke: 0.025em #111;
  paint-order: stroke fill;
}

/* Words of the scroll-scrubbed About text */
.word {
  display: inline;
  opacity: 0.18;
}

/* ---------- 8. Motion ---------- */
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal,
  .word {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
