:root {
  --bg: #0a0d0c;
  --bg-elevated: #101513;
  --bg-soft: #141a17;
  --card: rgba(20, 26, 23, 0.78);
  --text: #f2f6f3;
  --muted: #9ca9a1;
  --faint: #647069;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #baff46;
  --accent-soft: rgba(186, 255, 70, 0.14);
  --accent-2: #7af6d0;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  --radius: 22px;
  --radius-small: 14px;
  --container: 1180px;
  --header-height: 78px;
}

html[data-theme="light"] {
  --bg: #f4f6f2;
  --bg-elevated: #ffffff;
  --bg-soft: #e9eee7;
  --card: rgba(255, 255, 255, 0.85);
  --text: #111613;
  --muted: #566159;
  --faint: #7a857d;
  --line: rgba(17, 22, 19, 0.11);
  --line-strong: rgba(17, 22, 19, 0.19);
  --accent: #75a900;
  --accent-soft: rgba(117, 169, 0, 0.12);
  --accent-2: #078b70;
  --shadow: 0 24px 70px rgba(25, 40, 31, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 8%, rgba(186, 255, 70, 0.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

a { color: inherit; }

button, input, textarea, select { font: inherit; }

button { color: inherit; }

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

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

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.section { padding: 120px 0; }

.section-muted {
  background: linear-gradient(180deg, transparent, var(--bg-soft) 14%, var(--bg-soft) 86%, transparent);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #101510;
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease, backdrop-filter .25s ease;
}

.site-header.is-scrolled {
  background: rgba(10, 13, 12, .82);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #101510;
  font-size: 17px;
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  transition: color .2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--accent);
  transition: right .2s ease;
}

.site-nav a:hover { color: var(--text); }
.site-nav a:hover::after { right: 0; }

.theme-toggle {
  justify-self: end;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

.theme-toggle:hover { transform: rotate(8deg); border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: none; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 1px;
  margin: 5px 0;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.hero {
  min-height: 780px;
  padding-top: calc(var(--header-height) + 90px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 74px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 820px;
  margin: 24px 0 28px;
  font-size: clamp(48px, 6.2vw, 82px);
  line-height: .98;
  letter-spacing: -0.065em;
  font-weight: 790;
}

h2 {
  margin: 16px 0 0;
  max-width: 900px;
  font-size: clamp(36px, 4.5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 760;
}

h3 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.accent-text {
  color: var(--accent);
  text-shadow: 0 0 38px var(--accent-soft);
}

.hero-lead {
  max-width: 720px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 13px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 780;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

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

.button-primary {
  background: var(--accent);
  color: #111510;
  box-shadow: 0 14px 34px rgba(123, 170, 48, .18);
}

.button-primary:hover { box-shadow: 0 18px 42px rgba(123, 170, 48, .28); }

.button-secondary {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--text);
}

.button-secondary:hover { border-color: var(--accent); }

.button-large { min-height: 58px; padding-inline: 27px; font-size: 16px; }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 34px;
}

.hero-tags span,
.project-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 510px;
  isolation: isolate;
}

.visual-grid {
  position: absolute;
  inset: 3% -18% -10% 2%;
  z-index: -2;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
  opacity: .6;
  transform: perspective(500px) rotateX(58deg) rotateZ(-8deg) translateY(100px);
}

.system-card {
  position: absolute;
  border: 1px solid var(--line-strong);
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-soft));
  background: linear-gradient(145deg, color-mix(in srgb, var(--bg-elevated) 95%, transparent), color-mix(in srgb, var(--bg-soft) 75%, transparent));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.system-card-main {
  top: 91px;
  left: 50%;
  width: min(390px, 80%);
  padding: 31px;
  border-radius: 26px;
  transform: translateX(-50%) rotate(-2deg);
}

.system-card-kicker { color: var(--accent-2); font-size: 10px; font-weight: 850; letter-spacing: .16em; }
.system-card-title { margin-top: 12px; font-size: 30px; font-weight: 780; letter-spacing: -0.045em; }
.system-card-line { height: 1px; margin: 23px 0; background: linear-gradient(90deg, var(--accent), transparent); }
.system-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.system-metrics span { color: var(--muted); font-size: 12px; }
.system-metrics b { display: block; margin-bottom: 3px; color: var(--text); font-size: 16px; }

.orbit {
  position: absolute;
  left: 50%;
  top: 46%;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  pointer-events: none;
}

.orbit-one { width: 480px; height: 330px; }
.orbit-two { width: 380px; height: 470px; transform: translate(-50%, -50%) rotate(52deg); opacity: .65; }

.floating-node {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  animation: float 5s ease-in-out infinite;
}

.floating-node span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.node-hardware { top: 46px; right: 12px; }
.node-software { left: 0; top: 255px; animation-delay: -1.6s; }
.node-ops { right: 18px; bottom: 60px; animation-delay: -3s; }

.pulse-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(122, 246, 208, .35);
  animation: pulse 2.4s ease-out infinite;
}

.pulse-a { left: 72px; top: 92px; }
.pulse-b { right: 70px; top: 310px; animation-delay: -1.1s; }

.proof-strip { border-block: 1px solid var(--line); }

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.proof-grid > div {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}

.proof-grid > div:first-child { padding-left: 0; }
.proof-grid > div:last-child { border-right: 0; }
.proof-grid strong { margin-bottom: 5px; font-size: 16px; }
.proof-grid span { color: var(--muted); font-size: 13px; }

.split-layout {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 95px;
  align-items: start;
}

.about-copy { padding-top: 27px; }
.about-copy p { color: var(--muted); font-size: 18px; line-height: 1.75; }
.about-copy p + p { margin-top: 22px; }
.about-copy .large-copy { color: var(--text); font-size: clamp(23px, 2.5vw, 30px); line-height: 1.45; letter-spacing: -0.025em; }
.about-copy strong { color: var(--text); }

.section-heading { margin-bottom: 58px; }
.section-heading > p { max-width: 600px; margin-top: 22px; color: var(--muted); font-size: 17px; }
.section-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 40px; }
.section-heading-row > p { max-width: 360px; margin: 0 0 7px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  position: relative;
  min-height: 360px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--card), var(--bg-elevated));
  background: linear-gradient(155deg, var(--card), color-mix(in srgb, var(--bg-elevated) 88%, transparent));
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.project-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.project-featured { grid-column: span 2; min-height: 460px; padding-right: 48%; }

.project-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 48px; }
.project-index { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.project-label { color: var(--accent-2); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.project-card h3 { margin-bottom: 18px; font-size: 31px; }
.project-card > p { max-width: 590px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.project-role { margin-top: 26px; color: var(--text); font-size: 13px; font-weight: 720; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }

.project-graphic { position: absolute; inset: 18px 20px 18px 55%; }
.quokka-graphic { display: grid; place-items: center; }
.phone-shell {
  position: relative;
  z-index: 2;
  width: 178px;
  height: 340px;
  padding: 39px 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 33px;
  background: var(--bg-elevated);
  box-shadow: 0 25px 65px rgba(0,0,0,.35);
  transform: rotate(7deg);
}
.phone-notch { position: absolute; left: 50%; top: 10px; width: 68px; height: 17px; border-radius: 99px; background: var(--bg); transform: translateX(-50%); }
.food-card { height: 92px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-soft), rgba(122, 246, 208, .16)); border: 1px solid var(--line); }
.food-card.small { height: 75px; margin-top: 11px; opacity: .72; }
.order-button { position: absolute; left: 14px; right: 14px; bottom: 18px; height: 42px; border-radius: 12px; background: var(--accent); }
.signal-ring { position: absolute; border: 1px solid var(--accent); border-radius: 50%; opacity: .28; }
.ring-a { width: 280px; height: 280px; }
.ring-b { width: 390px; height: 390px; opacity: .12; }

.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
}

.process-step {
  min-height: 310px;
  padding: 28px 24px 20px;
  border-right: 1px solid var(--line);
}
.process-step:first-child { padding-left: 0; }
.process-step:last-child { border-right: 0; }
.process-step > span { color: var(--accent-2); font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
.process-step h3 { margin: 52px 0 15px; font-size: 22px; }
.process-step p { color: var(--muted); font-size: 14px; line-height: 1.65; }

.competencies-section { border-top: 1px solid var(--line); }
.competencies-layout { display: grid; grid-template-columns: .92fr 1.08fr; gap: 110px; }
.competencies-layout .section-heading { position: sticky; top: 130px; align-self: start; }
.competencies-list { border-top: 1px solid var(--line); }
.competencies-list > div {
  display: grid;
  grid-template-columns: 45px 1fr;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}
.competencies-list span { grid-row: span 2; color: var(--faint); font: 700 11px ui-monospace, SFMono-Regular, Menlo, monospace; padding-top: 4px; }
.competencies-list strong { font-size: 17px; }
.competencies-list p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }

.contact-section { padding-top: 55px; }
.contact-card {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 70px;
  align-items: center;
  padding: 64px;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background:
    radial-gradient(circle at 86% 10%, var(--accent-soft), transparent 25rem),
    var(--bg-elevated);
  box-shadow: var(--shadow);
}
.contact-card h2 { max-width: 720px; font-size: clamp(36px, 4vw, 54px); }
.contact-card p { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: 17px; }
.contact-actions { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.social-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 720; }
.social-links a:hover { color: var(--text); }

.site-footer { border-top: 1px solid var(--line); }
.footer-wrap { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 13px; }
.footer-wrap a { text-decoration: none; }
.footer-wrap a:hover { color: var(--text); }

.reveal-enabled .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.75,.2,1); }
.reveal-enabled .reveal.is-visible { opacity: 1; transform: none; }
.projects-grid .reveal:nth-child(2), .process-grid .reveal:nth-child(2) { transition-delay: .06s; }
.projects-grid .reveal:nth-child(3), .process-grid .reveal:nth-child(3) { transition-delay: .12s; }
.projects-grid .reveal:nth-child(4), .process-grid .reveal:nth-child(4) { transition-delay: .18s; }
.projects-grid .reveal:nth-child(5), .process-grid .reveal:nth-child(5) { transition-delay: .24s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(122, 246, 208, .35); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(122, 246, 208, 0); }
}

@media (max-width: 1020px) {
  .section { padding: 96px 0; }
  .hero { min-height: auto; padding-top: 150px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-copy { max-width: 850px; }
  .hero-visual { min-height: 510px; max-width: 680px; width: 100%; margin: 0 auto; }
  .split-layout { gap: 50px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .process-step { min-height: 245px; border-bottom: 1px solid var(--line); }
  .process-step:nth-child(2n) { border-right: 0; }
  .process-step:nth-child(5) { grid-column: span 2; border-right: 0; }
  .competencies-layout { gap: 60px; }
  .contact-card { grid-template-columns: 1fr; gap: 40px; }
  .contact-actions { align-items: flex-start; }
  .social-links { justify-content: flex-start; }
}

@media (max-width: 800px) {
  :root { --header-height: 68px; }
  body.menu-open .site-header.is-scrolled { background: var(--bg); backdrop-filter: none; }
  .container { width: min(calc(100% - 28px), var(--container)); }
  .nav-wrap { grid-template-columns: 1fr auto auto; gap: 10px; }
  .nav-toggle { display: block; order: 2; }
  .theme-toggle { order: 3; }
  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 42px 24px;
    background: var(--bg);
    transform: translateX(100%);
    transition: transform .28s ease;
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav a { width: 100%; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 22px; }
  .site-nav a::after { display: none; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  h1 { font-size: clamp(46px, 12vw, 68px); }
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .proof-grid > div { border-bottom: 1px solid var(--line); }
  .proof-grid > div:nth-child(2n) { border-right: 0; }
  .proof-grid > div:first-child { padding-left: 24px; }
  .proof-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .split-layout, .competencies-layout { grid-template-columns: 1fr; gap: 30px; }
  .competencies-layout .section-heading { position: static; }
  .section-heading-row { display: block; }
  .section-heading-row > p { margin-top: 22px; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-featured { grid-column: auto; min-height: 680px; padding-right: 30px; }
  .project-featured > p { max-width: 100%; }
  .project-graphic { inset: auto 20px 20px; height: 320px; }
  .phone-shell { transform: rotate(4deg) scale(.86); }
  .contact-card { padding: 42px 30px; }
}

@media (max-width: 560px) {
  .section { padding: 78px 0; }
  .hero { padding-top: 122px; }
  .hero-lead { font-size: 17px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .hero-visual { min-height: 420px; margin-top: 10px; }
  .system-card-main { top: 70px; width: 86%; padding: 24px; }
  .system-card-title { font-size: 25px; }
  .orbit-one { width: 360px; height: 260px; }
  .orbit-two { width: 300px; height: 380px; }
  .node-hardware { right: 0; top: 24px; }
  .node-software { left: 0; top: 280px; }
  .node-ops { right: 8px; bottom: 12px; }
  .proof-grid { grid-template-columns: 1fr; }
  .proof-grid > div { min-height: 98px; padding: 18px 0 !important; border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .proof-grid > div:last-child { border-bottom: 0 !important; }
  .project-card { min-height: auto; padding: 24px; }
  .project-featured { min-height: 650px; }
  .project-topline { margin-bottom: 38px; }
  .project-card h3 { font-size: 27px; }
  .process-grid { grid-template-columns: 1fr; }
  .process-step, .process-step:nth-child(5) { grid-column: auto; min-height: auto; padding: 25px 0; border-right: 0; }
  .process-step h3 { margin-top: 30px; }
  .contact-card { padding: 34px 22px; border-radius: 22px; }
  .contact-actions { align-items: stretch; }
  .social-links { justify-content: flex-start; }
  .footer-wrap { min-height: 130px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-enabled .reveal { opacity: 1; transform: none; }
}

html[data-theme="light"] .site-header.is-scrolled {
  background: rgba(244, 246, 242, .86);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
}
