/* ==================================================================
   Mugalu Abdul-hakim — frontend developer & Linux mentor
   One stylesheet. No build step.
   ================================================================== */

:root {
  --paper: #f5f2ec;
  --paper-deep: #ece7dd;
  --ink: #0b0c10;
  --ink-soft: #35383f;
  --muted: #6d717b;
  --line: rgba(11, 12, 16, 0.12);
  --line-strong: rgba(11, 12, 16, 0.22);
  --accent: #2f7df6;
  --accent-soft: #d7e6ff;
  --violet: #7b5cff;
  --paper-on-ink: #f3f0e9;
  --radius: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(15px, 0.55vw + 13px, 17px);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

[hidden] {
  display: none !important;
}

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

/* ---------------------------- a11y ------------------------------ */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-160%);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.88rem;
  transition: transform 0.3s var(--ease);
}

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

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

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
blockquote,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

.display {
  font-family: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

/* ---------------------------- layout ---------------------------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 140px) var(--gutter);
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: clamp(28px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(28px, 4vw, 56px);
}

.h2 {
  font-size: clamp(2rem, 5.2vw, 4rem);
}

.section__note {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 34ch;
}

/* ---------------------------- loader ---------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper-on-ink);
  transition: transform 1.1s var(--ease), border-radius 1.1s var(--ease);
}

.loader.is-done {
  transform: translateY(-101%);
  border-radius: 0 0 40% 40%;
}

/* Safety net: if script.js never runs, the page still appears */
.js .loader {
  animation: loaderOut 1s var(--ease) 6s forwards;
}

@keyframes loaderOut {
  to {
    transform: translateY(-101%);
    visibility: hidden;
  }
}

.loader__inner {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.loader__mark {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  animation: markIn 1.1s var(--ease) both, markFloat 3s ease-in-out 1.1s infinite;
}

.loader__name {
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(243, 240, 233, 0.6);
}

.loader__count {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.loader__bar {
  display: block;
  width: min(220px, 50vw);
  height: 2px;
  background: rgba(243, 240, 233, 0.18);
  overflow: hidden;
}

.loader__bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  animation: loadBar 1.6s var(--ease) forwards;
}

@keyframes loadBar {
  to {
    width: 100%;
  }
}

@keyframes markIn {
  from {
    opacity: 0;
    transform: scale(0.7) rotate(-12deg);
  }
}

@keyframes markFloat {
  50% {
    transform: translateY(-6px);
  }
}

/* --------------------------- progress --------------------------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 100;
  pointer-events: none;
}

.progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--violet));
}

/* ---------------------------- cursor ---------------------------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  pointer-events: none;
  mix-blend-mode: multiply;
  transition: opacity 0.3s ease;
}

.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor__dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.cursor__ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent);
  transition: width 0.35s var(--ease), height 0.35s var(--ease), opacity 0.35s ease,
    background 0.35s ease;
}

.cursor.is-hover .cursor__ring {
  width: 62px;
  height: 62px;
  background: rgba(47, 125, 246, 0.1);
}

/* ----------------------------- nav ------------------------------ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  transition: transform 0.5s var(--ease), background 0.4s ease, box-shadow 0.4s ease;
}

.nav.is-stuck {
  background: rgba(245, 242, 236, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 1px 0 var(--line);
}

/* Anchored sections stop clear of the fixed nav */
#work,
#contact {
  scroll-margin-top: 88px;
}

.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: clamp(0.9rem, 1.6vw, 1rem);
}

.nav__mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  transition: transform 0.6s var(--ease);
}

.nav__brand:hover .nav__mark {
  transform: rotate(-10deg) scale(1.08);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}

.nav__link {
  position: relative;
  font-size: 0.9rem;
  padding: 6px 0;
  overflow: hidden;
  display: inline-block;
}

.nav__link span {
  display: inline-block;
  transition: transform 0.45s var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s var(--ease);
}

.nav__link:hover::after,
.nav__link[aria-current='page']::after {
  transform: scaleX(1);
}

.nav__link:hover span {
  transform: translateY(-2px);
}

/* ---------------------------- buttons --------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.92rem;
  font-weight: 500;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s ease, border-color 0.4s ease, transform 0.4s var(--ease);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}

.btn:hover::before {
  transform: translateY(0);
}

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

.btn--solid {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.btn--solid::before {
  background: var(--accent);
}

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

.btn__arrow {
  display: inline-block;
  transition: transform 0.45s var(--ease);
}

.btn:hover .btn__arrow {
  transform: translate(3px, 3px);
}

.btn--small {
  padding: 9px 18px;
  font-size: 0.84rem;
}

/* Ghost has no fill of its own: on the dark footer it needs light ink */
.footer .btn--ghost {
  margin-top: 22px;
  border-color: rgba(243, 240, 233, 0.32);
  color: var(--paper-on-ink);
}

.footer .btn--ghost::before {
  background: var(--accent);
}

.footer .btn--ghost:hover {
  color: #fff;
  border-color: var(--accent);
}

/* ----------------------------- hero ----------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(110px, 16vh, 190px) var(--gutter) clamp(60px, 10vh, 110px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.blob--1 {
  width: 46vw;
  height: 46vw;
  left: -8vw;
  top: -6vw;
  background: radial-gradient(circle at 30% 30%, #8fc0ff, #2f7df6 70%);
  animation: drift1 26s ease-in-out infinite alternate;
}

.blob--2 {
  width: 38vw;
  height: 38vw;
  right: -6vw;
  top: 12vw;
  background: radial-gradient(circle at 60% 40%, #c9b8ff, #7b5cff 70%);
  animation: drift2 34s ease-in-out infinite alternate;
}

.blob--3 {
  width: 30vw;
  height: 30vw;
  left: 32vw;
  bottom: -12vw;
  background: radial-gradient(circle at 50% 50%, #a8e8d8, #2f7df6 75%);
  opacity: 0.4;
  animation: drift3 30s ease-in-out infinite alternate;
}

@keyframes drift1 {
  to {
    transform: translate3d(8vw, 5vw, 0) scale(1.15);
  }
}

@keyframes drift2 {
  to {
    transform: translate3d(-7vw, 6vw, 0) scale(0.9);
  }
}

@keyframes drift3 {
  to {
    transform: translate3d(5vw, -6vw, 0) scale(1.2);
  }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(circle at 50% 40%, #000 10%, transparent 72%);
  opacity: 0.5;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='0.42'/></svg>");
  mix-blend-mode: multiply;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(245, 242, 236, 0.6);
  backdrop-filter: blur(8px);
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(47, 125, 246, 0.55);
  animation: ping 2.4s ease-out infinite;
}

@keyframes ping {
  70% {
    box-shadow: 0 0 0 10px rgba(47, 125, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 125, 246, 0);
  }
}

.hero__title {
  font-size: clamp(3.4rem, 15vw, 13rem);
  margin: clamp(18px, 3vw, 34px) 0 clamp(26px, 4vw, 46px);
  text-transform: none;
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.line__in {
  display: block;
  will-change: transform;
}

.js .hero__title .line__in {
  transform: translateY(115%);
}

.js .hero__title .line:nth-child(2) .line__in {
  transition-delay: 0.1s;
}

.is-ready .hero__title .line__in {
  transform: none;
  transition: transform 1.15s var(--ease);
  transition-delay: inherit;
}

.hero__dot {
  color: var(--accent);
}

.hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 60px);
  flex-wrap: wrap;
}

.hero__lede {
  max-width: 46ch;
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  color: var(--ink-soft);
}

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

.js .eyebrow,
.js .hero__lede,
.js .hero__cta {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.is-ready .eyebrow {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}

.is-ready .hero__lede {
  opacity: 1;
  transform: none;
  transition-delay: 0.5s;
}

.is-ready .hero__cta {
  opacity: 1;
  transform: none;
  transition-delay: 0.62s;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}

.hero__scroll-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--ink), transparent);
  animation: scrollLine 2.4s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0.1);
    opacity: 0;
  }
  40% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

.js .hero__scroll {
  opacity: 0;
}

.is-ready .hero__scroll {
  opacity: 1;
  transition: opacity 1s ease 1s;
}

/* ---------------------------- ticker ---------------------------- */

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(14px, 2vw, 22px) 0;
  overflow: hidden;
  display: grid;
  gap: 6px;
}

.ticker__row {
  display: flex;
  overflow: hidden;
}

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

.ticker__track--rev {
  animation-direction: reverse;
  animation-duration: 52s;
}

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

@keyframes ticker {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.ticker__group {
  display: flex;
  align-items: center;
  flex: none;
}

.ticker__group li {
  display: flex;
  align-items: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.3rem, 3.4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  white-space: nowrap;
  padding-right: 0.6em;
}

.ticker__group li::after {
  content: '✳';
  font-size: 0.42em;
  color: var(--accent);
  margin-left: 0.9em;
  transform: translateY(-0.15em);
}

.ticker__row--ghost .ticker__group li {
  color: transparent;
  -webkit-text-stroke: 1px rgba(11, 12, 16, 0.42);
}

.ticker__row--ghost .ticker__group li::after {
  -webkit-text-stroke: 0;
  color: var(--violet);
}

/* ----------------------------- work ----------------------------- */

.hero__badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
  box-shadow: 0 0 0 2px rgba(47, 125, 246, 0.55), 0 12px 30px -12px rgba(11, 12, 16, 0.5);
  transition: transform 0.6s var(--ease), box-shadow 0.4s ease;
}

.hero__badge:hover .hero__avatar {
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 0 0 3px var(--accent), 0 16px 34px -12px rgba(11, 12, 16, 0.55);
}

.js .hero__avatar {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.is-ready .hero__avatar {
  opacity: 1;
  transform: none;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2.4vw, 34px);
}

.card {
  grid-column: span 12;
}

.card--large {
  grid-column: span 7;
}

.card--small {
  grid-column: span 5;
}

.card__link {
  display: block;
}

.card__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  isolation: isolate;
}

.card--large .card__media {
  aspect-ratio: 16 / 12;
}

.card--small .card__media {
  aspect-ratio: 4 / 5;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.1s var(--ease);
}

.card__link:hover .card__media img {
  transform: scale(1.09);
}

/* Logo and icon pieces are shown as specimens, not full-bleed crops */
.card--contain .card__media img {
  object-fit: contain;
  padding: 13%;
  transform: none;
}

.card--contain .card__link:hover .card__media img {
  transform: scale(1.05);
}

.frame--contain img {
  object-fit: contain;
  padding: 15%;
  transform: none !important;
}

.card__pill {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.card__media:hover .card__pill {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
}

.card__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card__cat {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
}

.card__year {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
}

/* ----------------------------- split ---------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 6vw, 90px);
  align-items: center;
}

.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep);
  aspect-ratio: 4 / 5;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.split__body .h2 {
  font-size: clamp(1.9rem, 4vw, 3.3rem);
  margin-bottom: 22px;
}

.prose p {
  color: var(--ink-soft);
  margin-bottom: 16px;
  max-width: 52ch;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: gap 0.4s var(--ease), color 0.3s ease, border-color 0.3s ease;
}

.more:hover {
  gap: 14px;
  color: var(--accent);
  border-color: var(--accent);
}

/* --------------------------- services --------------------------- */

.services {
  border-top: 1px solid var(--line);
}

.service {
  border-bottom: 1px solid var(--line);
}

.service__btn {
  width: 100%;
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  align-items: center;
  gap: 12px;
  padding: clamp(18px, 2.6vw, 30px) 0;
  text-align: left;
  transition: padding 0.5s var(--ease), color 0.4s ease;
}

.service__btn:hover {
  padding-left: 10px;
  color: var(--accent);
}

.service__num {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.service__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.service__icon {
  justify-self: end;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.5s var(--ease), color 0.4s ease;
}

.service.is-open .service__icon {
  transform: rotate(135deg);
  color: var(--accent);
}

.service__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}

.service.is-open .service__panel {
  grid-template-rows: 1fr;
}

.service__panel > div {
  overflow: hidden;
}

.service__body {
  color: var(--ink-soft);
  max-width: 62ch;
  padding: 0 0 clamp(20px, 3vw, 30px) 72px;
  opacity: 0;
  transition: opacity 0.5s ease 0.1s;
}

.service.is-open .service__body {
  opacity: 1;
}

/* ---------------------------- panel ----------------------------- */

.panel {
  position: relative;
  border-radius: calc(var(--radius) + 8px);
  background: var(--ink);
  color: var(--paper-on-ink);
  padding: clamp(30px, 6vw, 70px);
  overflow: hidden;
  isolation: isolate;
}

.panel__glow {
  position: absolute;
  inset: -30%;
  z-index: -1;
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 50%),
    rgba(47, 125, 246, 0.45),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
}

.panel:hover .panel__glow {
  opacity: 1;
}

.panel__mark {
  position: absolute;
  right: -48px;
  bottom: -64px;
  z-index: -1;
  width: clamp(210px, 27vw, 360px);
  height: auto;
  opacity: 0.13;
  filter: brightness(1.9) saturate(0.7);
  pointer-events: none;
}

.quotes {
  display: grid;
  min-height: 260px;
  align-content: start;
}

.quotes__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(243, 240, 233, 0.5);
  margin-bottom: 26px;
}

.quote {
  grid-row: 2;
  grid-column: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0.6s;
}

.quote.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0.08s;
}

.quote__text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.35rem, 3.2vw, 2.4rem);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: -0.02em;
  max-width: 26ch;
}

.quote__by {
  margin-top: 22px;
  font-size: 0.86rem;
  color: rgba(243, 240, 233, 0.6);
}

.quote__by strong {
  color: var(--paper-on-ink);
  font-weight: 500;
}

.quotes__nav {
  grid-row: 3;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 30px;
  height: 3px;
  background: rgba(243, 240, 233, 0.25);
  border-radius: 999px;
  transition: background 0.4s ease, width 0.4s var(--ease);
}

.dot.is-active {
  width: 56px;
  background: var(--accent);
}

.quotes__next {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(243, 240, 233, 0.28);
  display: grid;
  place-items: center;
  transition: background 0.4s ease, color 0.4s ease, transform 0.4s var(--ease);
}

.quotes__next:hover {
  background: var(--paper-on-ink);
  color: var(--ink);
  transform: rotate(-45deg);
}

/* ---------------------------- detail ---------------------------- */

.detail {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(110px, 16vh, 180px) var(--gutter) clamp(60px, 9vw, 120px);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 34px;
  transition: gap 0.4s var(--ease), color 0.3s ease;
}

.back:hover {
  gap: 14px;
  color: var(--ink);
}

.detail__title {
  font-size: clamp(2.6rem, 9vw, 7rem);
}

.detail__summary {
  max-width: 44ch;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
}

.detail__media {
  margin: clamp(30px, 5vw, 60px) 0;
  aspect-ratio: 16 / 9;
}

.detail__grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: clamp(24px, 5vw, 70px);
  padding-top: clamp(20px, 4vw, 40px);
  border-top: 1px solid var(--line);
}

.detail__meta {
  display: grid;
  gap: 18px;
  align-content: start;
}

.detail__meta dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.detail__meta dd {
  font-size: 0.94rem;
}

.detail__body p {
  color: var(--ink-soft);
  margin-bottom: 18px;
  max-width: 60ch;
}

.detail__body .lead {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  color: var(--ink);
}

.detail__crops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2vw, 26px);
  margin: clamp(34px, 5vw, 60px) 0;
}

.crop {
  aspect-ratio: 4 / 3;
}

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

.next {
  display: block;
  border-top: 1px solid var(--line);
  padding-top: clamp(20px, 3vw, 34px);
}

.next__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.next__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.next__title {
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  transition: color 0.3s ease;
}

.next:hover .next__title {
  color: var(--accent);
}

.next__thumb {
  width: clamp(70px, 12vw, 130px);
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  flex: none;
}

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

/* ---------------------------- about ----------------------------- */

.about {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(110px, 16vh, 180px) var(--gutter) clamp(60px, 9vw, 120px);
}

.about__title {
  font-size: clamp(2.4rem, 8vw, 6rem);
  margin: 20px 0 clamp(40px, 6vw, 80px);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}

.about__side .frame {
  aspect-ratio: 3 / 4;
}

.socials {
  margin-top: 20px;
  display: grid;
  gap: 2px;
}

.social {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  transition: color 0.3s ease, padding 0.4s var(--ease);
}

.social:hover {
  color: var(--accent);
  padding-left: 6px;
}

.social__handle {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.about__lead {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
  max-width: 34ch;
}

.focus {
  margin: clamp(30px, 5vw, 50px) 0;
}

.about__label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.focus__list li {
  display: grid;
  grid-template-columns: minmax(80px, 110px) 1fr;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.focus__list li:last-child {
  border-bottom: 1px solid var(--line);
}

.focus__tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding-top: 3px;
}

.focus__title {
  display: block;
  font-weight: 500;
}

.focus__detail {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 10px;
}

.stat__value {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 18ch;
}

/* ---------------------------- footer ---------------------------- */

.footer {
  background: var(--ink);
  color: var(--paper-on-ink);
  margin-top: clamp(40px, 8vw, 100px);
  border-radius: 40px 40px 0 0;
}

.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(50px, 8vw, 110px) var(--gutter) 28px;
}

.footer__top {
  display: grid;
  gap: 26px;
  padding-bottom: clamp(34px, 5vw, 60px);
  border-bottom: 1px solid rgba(243, 240, 233, 0.16);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 240, 233, 0.6);
  flex-wrap: wrap;
}

.footer__brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.footer__brand-name {
  color: var(--paper-on-ink);
}

.footer__brand-rule {
  width: clamp(24px, 6vw, 72px);
  height: 1px;
  background: rgba(243, 240, 233, 0.28);
}

.footer__title {
  font-size: clamp(2.4rem, 8vw, 6.4rem);
}

.accent {
  color: var(--accent);
  font-style: italic;
}

.mailto {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(1.1rem, 2.6vw, 1.9rem);
  font-family: 'Bricolage Grotesque', sans-serif;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(243, 240, 233, 0.3);
  width: fit-content;
  transition: color 0.3s ease, border-color 0.3s ease, gap 0.5s var(--ease);
}

.mailto:hover {
  color: var(--accent);
  border-color: var(--accent);
  gap: 22px;
}

.footer__alt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(243, 240, 233, 0.66);
}

.footer__alt a {
  color: var(--paper-on-ink);
  border-bottom: 1px solid rgba(243, 240, 233, 0.34);
  padding-bottom: 1px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.footer__alt a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.footer__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  color: rgba(243, 240, 233, 0.62);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: ping 2.6s ease-out infinite;
}

.footer__mid {
  padding: clamp(30px, 5vw, 54px) 0;
  border-bottom: 1px solid rgba(243, 240, 233, 0.16);
}

.contact {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.contact__hint {
  font-size: 0.84rem;
  color: rgba(243, 240, 233, 0.5);
}

.contact__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 240, 233, 0.55);
}

.field input,
.field textarea {
  font-family: 'Inter', sans-serif;
  font-size: 0.96rem;
  color: var(--paper-on-ink);
  background: rgba(243, 240, 233, 0.06);
  border: 1px solid rgba(243, 240, 233, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  width: 100%;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(243, 240, 233, 0.1);
}

.field input[data-invalid],
.field textarea[data-invalid] {
  border-color: #ff8f8f;
  background: rgba(255, 143, 143, 0.08);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.contact .btn {
  justify-self: start;
  border-color: rgba(243, 240, 233, 0.3);
  color: var(--paper-on-ink);
}

.contact .btn::before {
  background: var(--accent);
}

.contact .btn:hover {
  color: #fff;
  border-color: var(--accent);
}

.contact__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.contact__error {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 143, 143, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 143, 143, 0.1);
  color: #ffd9d9;
  font-size: 0.92rem;
  line-height: 1.5;
}

.contact__sent-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 0.84rem;
  color: rgba(243, 240, 233, 0.55);
}

.footer__links {
  display: flex;
  gap: 18px;
}

.footer__links a {
  position: relative;
  transition: color 0.3s ease;
}

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

/* --------------------------- back to top ------------------------ */

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 80;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: var(--ink);
  color: var(--paper-on-ink);
  border: 1px solid rgba(243, 240, 233, 0.2);
  box-shadow: 0 14px 34px -14px rgba(11, 12, 16, 0.7);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s var(--ease), background 0.3s ease;
}

.to-top.is-shown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* --------------------------- reveals ---------------------------- */

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

.js [data-reveal='fade'] {
  transform: none;
}

.js [data-reveal='clip'] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal='line'] {
  opacity: 1;
  transform: none;
}

.js [data-reveal='line'] .line__in {
  transform: translateY(112%);
  transition: transform 1.05s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
}

.js [data-reveal='line'].is-in .line__in {
  transform: none;
}

.view--swap {
  animation: viewIn 0.7s var(--ease) both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.contact__preview {
  margin-top: 32px;
  background: rgba(243, 240, 233, 0.06);
  border: 1px solid rgba(243, 240, 233, 0.18);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.contact__preview-title {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(243, 240, 233, 0.55);
}

.contact__preview-text {
  margin: 0;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--paper-on-ink);
  background: transparent;
  border: 0;
  padding: 0;
  overflow: auto;
  max-height: 260px;
}

/* --------------------------- responsive ------------------------- */

@media (max-width: 1000px) {
  .split,
  .about__grid,
  .detail__grid {
    grid-template-columns: 1fr;
  }

  .card--large,
  .card--small {
    grid-column: span 12;
  }

  .card--small .card__media {
    aspect-ratio: 16 / 12;
  }

  .quotes {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .nav__name {
    display: none;
  }

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

  .contact__row {
    grid-template-columns: 1fr;
  }

  .detail__crops,
  .stats {
    grid-template-columns: 1fr;
  }

  .service__btn {
    grid-template-columns: 40px 1fr 32px;
  }

  .service__body {
    padding-left: 0;
  }

  .footer {
    border-radius: 26px 26px 0 0;
  }

  .cursor {
    display: none;
  }
}


/* ---------------------- live study artwork ---------------------- */

/* The markup and terminal studies are drawn in the page and type
   themselves, restarting on a four-second cycle. */
.live {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 90% at 6% 0%, rgba(47, 125, 246, 0.3), transparent 62%),
    radial-gradient(110% 85% at 100% 100%, rgba(123, 92, 255, 0.26), transparent 64%),
    linear-gradient(160deg, #0b0c10, #101526 58%, #171e35);
  color: #cfd8ea;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.9;
  user-select: none;
}

.live__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.live__dots {
  display: inline-flex;
  gap: 5px;
}

.live__dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6b6b;
  opacity: 0.85;
}

.live__dots i:nth-child(2) {
  background: #ffc86b;
}

.live__dots i:nth-child(3) {
  background: #5fe0a4;
}

.live__file {
  overflow: hidden;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: #8b96ad;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live__screen {
  flex: 1;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
}

.live__code {
  margin: 0;
  font: inherit;
  white-space: pre;
}

.live__line {
  display: block;
  transition: opacity 0.35s ease;
}

.live__line.is-pending {
  opacity: 0;
}

.live__line--tag {
  color: #82b4ff;
}

.live__line--text {
  color: #eef3fc;
}

.live__line--muted {
  color: #6d7891;
}

.live__line--cmd {
  color: #eef3fc;
}

.live__line--out {
  color: #94a0b6;
}

.live__prompt {
  margin-right: 8px;
  color: #7ee7c7;
}

.live__line.is-active .live__text::after {
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 2px;
  background: currentColor;
  vertical-align: -0.16em;
  animation: liveCaret 1s steps(1) infinite;
}

@keyframes liveCaret {
  50% {
    opacity: 0;
  }
}

.detail__media .live {
  font-size: clamp(12px, 1.45vw, 18px);
}

.detail__media .live__screen {
  padding: clamp(18px, 2.4vw, 34px);
}

.detail__media .live__bar {
  padding: 14px clamp(18px, 2.4vw, 34px);
}

.detail__media .live__dots i {
  width: 8px;
  height: 8px;
}

@media (max-width: 640px) {
  .live {
    font-size: 10.5px;
  }

  .live__screen {
    padding: 12px;
  }
}
