/* Deliberately the same palette and type as worldpulse.nordl.dev, so the
   subdomain reads as part of the same place rather than a separate site. */

:root {
  --bg: #070b16;
  --ink: #f2f7ff;
  --muted: #8ea0c4;
  --accent: #3ee0c5;
  --shell: rgba(11, 17, 32, 0.68);
  --edge: rgba(255, 255, 255, 0.09);
  --edge-lit: color-mix(in srgb, var(--accent) 40%, transparent);
  --sans: "Sora", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.aurora {
  position: fixed;
  inset: -30vh -30vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(36vw 36vw at 18% 12%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 62%),
    radial-gradient(32vw 32vw at 84% 6%, rgba(109, 141, 255, 0.18), transparent 60%),
    radial-gradient(44vw 44vw at 62% 96%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 66%);
  filter: blur(40px) saturate(130%);
  animation: drift 30s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.07); }
}

.page {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 96px;
}

/* --- masthead --- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 8px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.wordmark span { color: var(--accent); }

.links a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* --- intro --- */

.intro {
  padding: 76px 0 52px;
  max-width: 34ch;
}

.intro h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, var(--ink) 34%, color-mix(in srgb, var(--ink) 44%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro p {
  margin: 0;
  max-width: 48ch;
  font-size: 1.04rem;
  line-height: 1.62;
  color: var(--muted);
}

/* --- projects --- */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project {
  display: block;
  padding: 26px;
  border-radius: 22px;
  border: 1px solid var(--edge);
  background: var(--shell);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 20px 60px -32px rgba(0, 0, 0, 0.9);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.project:nth-child(2) { animation-delay: 0.08s; }

.project.live:hover {
  border-color: var(--edge-lit);
  transform: translateY(-3px);
  box-shadow: 0 28px 72px -32px color-mix(in srgb, var(--accent) 32%, rgba(0, 0, 0, 0.9));
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.project h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.badge {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--accent);
  border: 1px solid var(--edge-lit);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  white-space: nowrap;
}

.badge.quiet {
  color: var(--muted);
  border-color: var(--edge);
  background: rgba(255, 255, 255, 0.03);
}

.project-line {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.project-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.project-meta li {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid var(--edge);
}

.placeholder { opacity: 0.62; }

/* --- foot --- */

.foot {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--edge);
}

.foot p {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.foot a { color: var(--accent); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .aurora, .project { animation: none; }
}

/* --- services --- */

.services {
  margin-top: 56px;
  padding: 30px 28px;
  border-radius: 22px;
  border: 1px solid var(--edge-lit);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    var(--shell);
  backdrop-filter: blur(20px) saturate(150%);
}

.services-title {
  margin: 0 0 10px;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.services-lede {
  margin: 0 0 26px;
  max-width: 54ch;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.service h3 {
  margin: 0 0 8px;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.service p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

.services-contact { margin: 28px 0 0; }

.contact-button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 14px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: #06231e;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  box-shadow: 0 12px 32px -14px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.contact-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.contact-button:active { transform: translateY(0); }

.contact-alt {
  margin-left: 16px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}

.contact-alt:hover { color: var(--accent); }

/* A project with no public source: present, clearly not clickable. */
.project.private { cursor: default; }
.project.private:hover { transform: none; }

.mono-inline {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--ink);
}

/* --- who / currently --- */

.intro { max-width: none; }

.who {
  max-width: 62ch;
  margin: 0 0 14px;
}

.now {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.7;
}

.now-label {
  display: inline-block;
  margin-right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--edge-lit);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

/* --- concepts: present, deliberately quiet --- */

.concepts {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--edge);
}

.concepts-title {
  margin: 0 0 4px;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.concepts-note {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.concepts-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.concepts-list li {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
}

.concepts-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--edge-lit);
}

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

.services-availability {
  margin: 24px 0 0;
  max-width: 56ch;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink);
}

/* The badge is real chain state, fetched at deploy time rather than by script
   in the browser. Sized to the card so it reads as part of it. */
.pulse-badge {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 16px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: #070b16;
}

/* Screenshots sit flush at the top of a card, so the card reads as a window
   onto the thing rather than a paragraph with a picture stuck under it. */
.shot {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 16px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: #0b1120;
}




/* <picture> is inline by default, so an img inside it sizing to 100% resolves
   against a shrink-to-fit box rather than the column. On a narrow screen that
   collapsed the screenshot to 124px. */
.feature-media picture {
  display: block;
  width: 100%;
}

/* --- case study page -------------------------------------------------------
   A detail page exists so the screenshot has room. On the card grid it rendered
   at a fifth of its size and read as noise; here it gets the full column. */

.case {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 0 20px;
}

.case-kicker {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.case h1 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.case-line {
  margin: 0 0 28px;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.015em;
}

.case-body {
  margin: 0 0 22px;
  font-size: 1rem;
  line-height: 1.68;
  color: var(--muted);
}

.case h2 {
  margin: 38px 0 14px;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Break out of the text column so the screenshot is actually legible. The
   width alone is not enough: without re-centring, a figure wider than its
   column simply runs off the right edge and the page scrolls sideways. */
.case-figure {
  margin: 32px 0;
  width: min(1040px, calc(100vw - 40px));
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

.case-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--edge);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.95);
  background: #0b1120;
}

.case-figure picture { display: block; width: 100%; }

.case-figure figcaption {
  margin-top: 12px;
  max-width: 70ch;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--muted);
}

.case-list {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.case-list li {
  padding-left: 18px;
  position: relative;
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--muted);
}

.case-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.case-list strong { color: var(--ink); font-weight: 600; }

.case-meta { margin-top: 26px; }

.case-actions {
  margin: 36px 0 0;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* A tall phone capture beside its text, rather than breaking out full width
   the way a wide desktop screenshot does. */
.case-split {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
  margin: 26px 0 10px;
}

.case-split-copy > :first-child { margin-top: 0; }

.case-phone {
  margin: 0;
  position: sticky;
  top: 30px;
}

.case-phone picture { display: block; }

.case-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  border: 1px solid var(--edge);
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.95);
}

.case-figure.narrow {
  width: min(680px, calc(100vw - 40px));
}

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

@media (max-width: 760px) {
  .case-split {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .case-phone {
    position: static;
    max-width: 300px;
  }
}

/* An architecture diagram is the artefact here, so let it be one. */
.case-code {
  margin: 24px 0 28px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: rgba(0, 0, 0, 0.28);
  overflow-x: auto;
}

.case-code code {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.65;
  color: var(--muted);
  white-space: pre;
}
