:root {
  color-scheme: light;
  --bg: #eef2f5;
  --bg-deep: #d9e3ea;
  --ink: #132029;
  --muted: #4a5d6a;
  --line: rgba(19, 32, 41, 0.12);
  --accent: #0e7c86;
  --accent-ink: #063a40;
  --surface: rgba(255, 255, 255, 0.55);
  --header: rgba(238, 242, 245, 0.82);
  --shadow-soft: 0 24px 60px rgba(19, 32, 41, 0.08);
  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --body: "Source Sans 3", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--body);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(14, 124, 134, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(142, 175, 192, 0.35), transparent 45%),
    linear-gradient(180deg, #f5f7f9 0%, var(--bg) 40%, #e4ebf0 100%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1.25rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  object-fit: contain;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2.5vw, 2rem);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav a {
  transition: color 0.2s ease;
}

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

/* —— Hero: one composition, brand-first, full-bleed visual —— */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: calc(100vh - 4.5rem);
  padding: clamp(4rem, 10vw, 8rem) clamp(1.25rem, 5vw, 5rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.topology {
  width: 100%;
  height: 100%;
  display: block;
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.topology-links path {
  stroke-dasharray: 8 10;
  animation: link-flow 14s linear infinite;
}

.pulse {
  transform-origin: center;
  transform-box: fill-box;
  animation: node-pulse 3.6s ease-out infinite;
}

.pulse.p2 {
  animation-delay: 0.8s;
}

.pulse.p3 {
  animation-delay: 1.6s;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  animation: rise-in 0.9s ease-out both;
}

.brand-lockup {
  margin: 0 0 1.25rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--ink);
}

.hero h1 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--display);
  font-size: clamp(1.65rem, 3.4vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.lede {
  max-width: 38rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button.primary {
  color: #f4fafb;
  background: var(--accent);
}

.button.primary:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--ink);
  border-color: rgba(19, 32, 41, 0.22);
  background: rgba(255, 255, 255, 0.45);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-1px);
}

/* —— Sections —— */
.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) clamp(1.25rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.section-lede {
  max-width: 40rem;
  margin: 1.35rem 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.practice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.practice-list li {
  padding: 1.75rem 1.5rem 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.practice-list li:nth-child(odd) {
  padding-right: 2rem;
  border-right: 1px solid var(--line);
}

.practice-list li:nth-child(even) {
  padding-left: 2rem;
}

.practice-list p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

/* —— Work / project —— */
.work {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 40%),
    var(--bg-deep);
}

.work-intro {
  margin-bottom: 3rem;
}

.project {
  display: grid;
  grid-template-columns: minmax(10rem, 0.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.project-domain {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.project-body h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
}

.project-body > p {
  max-width: 42rem;
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.project-traits {
  display: grid;
  gap: 1.25rem;
  margin: 2.25rem 0 0;
  padding: 0;
}

.project-traits div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.project-traits dt {
  margin: 0;
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-traits dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

/* —— Approach —— */
.approach-steps {
  display: grid;
  gap: 0;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.approach-steps li {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}

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

.approach-steps span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.approach-steps p {
  margin: 0.55rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  line-height: 1.65;
}

/* —— Contact —— */
.contact {
  background:
    radial-gradient(ellipse 70% 80% at 90% 20%, rgba(14, 124, 134, 0.1), transparent 55%),
    #e8eef2;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.5rem clamp(1.25rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.site-footer p {
  margin: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.02) translate(0, 0);
  }
  to {
    transform: scale(1.06) translate(-1.5%, 1%);
  }
}

@keyframes link-flow {
  to {
    stroke-dashoffset: -120;
  }
}

@keyframes node-pulse {
  0% {
    opacity: 0.55;
    transform: scale(0.55);
  }
  70% {
    opacity: 0;
    transform: scale(1.8);
  }
  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@media (max-width: 900px) {
  .practice-list {
    grid-template-columns: 1fr;
  }

  .practice-list li:nth-child(odd),
  .practice-list li:nth-child(even) {
    padding: 1.5rem 0;
    border-right: none;
  }

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

  .project-traits div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding-top: 3.5rem;
  }

  .brand-lockup {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
  }

  .approach-steps li {
    grid-template-columns: 3rem minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .topology,
  .topology-links path,
  .pulse,
  .hero-copy {
    animation: none;
  }
}
