:root {
  color-scheme: dark;
  --bg: #050807;
  --bg-soft: #0a0f0d;
  --panel: #101715;
  --panel-2: #141d1a;
  --text: #eef7f2;
  --muted: #a8b8b0;
  --faint: #697a72;
  --line: rgba(190, 255, 220, 0.16);
  --green: #29f28b;
  --green-soft: rgba(41, 242, 139, 0.13);
  --green-strong: #8affbd;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(41, 242, 139, 0.04), transparent 34rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 48px 48px, auto;
  color: var(--text);
  line-height: 1.6;
}

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

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--green);
  color: #00160a;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 800;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid transparent;
  background: rgba(5, 8, 7, 0.7);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(5, 8, 7, 0.92);
}

.brand,
.nav-links,
.hero-actions,
.signal-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.nav-links {
  gap: clamp(10px, 2vw, 26px);
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a,
.header-cta {
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.header-cta {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  font-weight: 700;
}

.header-cta:hover {
  border-color: rgba(41, 242, 139, 0.55);
  background: var(--green-soft);
}

.section-shell {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.74fr);
  gap: clamp(30px, 4vw, 58px);
  align-items: center;
  min-height: min(820px, calc(100svh - 72px));
  padding: clamp(54px, 7vw, 92px) 0;
}

.eyebrow,
.project-number,
.panel-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.04;
}

h1 {
  max-width: 760px;
  font-size: clamp(3rem, 5.4vw, 4.65rem);
  line-height: 1;
}

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

h3 {
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
}

.hero-text,
.project-lead,
.contact-card > p {
  max-width: 800px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 850;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button.primary {
  background: var(--green);
  color: #00160a;
  border-color: var(--green);
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button.secondary:hover {
  border-color: rgba(41, 242, 139, 0.55);
  background: var(--green-soft);
}

.signal-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.signal-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--green-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
}

.hero-visual {
  display: grid;
  gap: 16px;
}

.profile-panel,
.terminal-panel,
.principle,
.capability,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow);
}

.profile-panel {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
}

.profile-photo {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.profile-panel h2 {
  margin-bottom: 8px;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
}

.profile-panel p {
  margin: 0;
  color: var(--muted);
}

.terminal-panel {
  overflow: hidden;
}

.terminal-top {
  display: flex;
  gap: 7px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.8;
}

pre {
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  color: #cdf8dc;
  font-size: clamp(0.78rem, 1.5vw, 0.95rem);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 48px 0 24px;
}

.section-heading h2 {
  max-width: 850px;
}

.section-intro {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
}

.principle,
.capability {
  padding: 22px;
}

.principle strong,
.capability span {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
}

.principle p,
.capability p,
.detail-block p,
.check-list {
  color: var(--muted);
}

.projects-index {
  padding: 82px 0 32px;
}

.index-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.index-list a {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  background: var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.index-list a:hover {
  transform: translateY(-3px);
  border-color: rgba(41, 242, 139, 0.55);
  background: var(--panel-2);
}

.index-list span {
  color: var(--green);
  font-weight: 900;
}

.project-section {
  padding: clamp(64px, 9vw, 112px) 0;
  border-top: 1px solid var(--line);
}

.feature-project {
  background: linear-gradient(180deg, transparent, rgba(41, 242, 139, 0.025), transparent);
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(330px, 0.84fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.project-layout.reverse {
  grid-template-columns: minmax(330px, 0.78fr) minmax(0, 1fr);
}

.project-copy {
  display: grid;
  gap: 24px;
}

.project-copy h2 {
  max-width: 880px;
}

.detail-block {
  display: grid;
  gap: 10px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.proof-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.proof-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.proof-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.48;
}

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

.check-list li {
  position: relative;
  padding-left: 22px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.stack-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stack-groups div {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.stack-groups span {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stack-groups p {
  margin: 0;
  color: var(--muted);
}

.project-media {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 94px;
}

.media-main,
.media-thumb,
.project-visual-placeholder,
.crm-redacted {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.media-main {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.media-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-thumb {
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.media-thumb img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  transition: transform 220ms ease;
}

.media-thumb:hover img {
  transform: scale(1.04);
}

.project-visual-placeholder {
  min-height: 460px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(41, 242, 139, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    #030504;
}

.project-visual-placeholder span {
  display: grid;
  place-items: center;
  width: clamp(120px, 20vw, 180px);
  height: clamp(120px, 20vw, 180px);
  border: 1px solid rgba(41, 242, 139, 0.46);
  border-radius: 8px;
  color: var(--green);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 950;
}

.project-visual-placeholder p,
.crm-redacted p {
  margin: 0;
  color: var(--muted);
}

.crm-redacted {
  padding: 18px;
  min-height: 460px;
  display: grid;
  gap: 18px;
}

.crm-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.crm-top strong {
  color: var(--green);
}

.crm-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.crm-columns div {
  min-height: 310px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.crm-columns b {
  display: block;
  color: var(--text);
  font-size: 0.8rem;
  margin-bottom: 14px;
}

.crm-columns i {
  display: block;
  height: 54px;
  margin-bottom: 10px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(41, 242, 139, 0.2), rgba(255, 255, 255, 0.06));
  filter: blur(0.4px);
}

.capabilities {
  padding: 82px 0;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.capability h3 {
  margin-bottom: 10px;
}

.contact-section {
  padding: 24px 0 94px;
}

.contact-card {
  padding: clamp(28px, 6vw, 54px);
}

.contact-card h2 {
  max-width: 900px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 54px 18px 18px;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-height: calc(100svh - 92px);
  border-radius: 8px;
  border: 1px solid var(--line);
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  .nav-links {
    display: none;
  }

  .hero,
  .project-layout,
  .project-layout.reverse,
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .project-media {
    position: static;
  }

  .index-list,
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 64px;
    padding: 12px 18px;
  }

  .header-cta {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .profile-panel,
  .stack-groups,
  .proof-grid,
  .index-list,
  .capability-grid,
  .media-grid,
  .media-grid.two,
  .crm-columns {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    width: 88px;
    height: 88px;
  }

  .media-thumb img {
    height: 170px;
  }

  .crm-columns div {
    min-height: 160px;
  }

  h1 {
    font-size: clamp(2.32rem, 10.2vw, 3.22rem);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(1.75rem, 8.4vw, 2.58rem);
    line-height: 1.06;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
