:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #607080;
  --line: #d9e0e8;
  --paper: #f7f4ee;
  --white: #fffdf8;
  --blue: #1f6feb;
  --green: #1f9d7a;
  --yellow: #e6a817;
  --coral: #d95f43;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(247, 244, 238, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: white;
  background: var(--ink);
  border-radius: 8px;
  font-size: 0.92rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.94rem;
}

nav a {
  text-decoration: none;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(42px, 7vw, 90px) clamp(20px, 5vw, 72px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.85rem, 5.8vw, 5.15rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p:not(.eyebrow),
.section-heading p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: white;
  background: var(--ink);
}

.button.secondary {
  background: transparent;
}

.hero-visual {
  position: relative;
  min-height: 520px;
  border-left: 1px solid var(--line);
}

.signal-grid {
  position: absolute;
  inset: 36px 0 36px 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 12px;
}

.signal-grid span {
  min-height: 82px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.68);
  border-radius: 8px;
}

.signal-grid span:nth-child(3n) {
  background: rgba(31, 111, 235, 0.12);
}

.signal-grid span:nth-child(4n) {
  background: rgba(31, 157, 122, 0.14);
}

.orbit-card {
  position: absolute;
  right: 4%;
  display: grid;
  width: min(330px, 88%);
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.orbit-card strong {
  font-size: 1.2rem;
}

.orbit-card span {
  color: var(--muted);
}

.orbit-card.top {
  top: 70px;
}

.orbit-card.middle {
  top: 215px;
  right: 18%;
}

.orbit-card.bottom {
  top: 360px;
}

.section {
  padding: clamp(48px, 7vw, 86px) clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  max-width: 820px;
  margin-bottom: 28px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.diagram-shell,
.project-card,
.private-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.diagram-shell {
  padding: 22px;
  overflow-x: auto;
}

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

.project-card {
  display: grid;
  grid-template-rows: 220px 1fr;
  overflow: hidden;
}

.project-shot {
  display: grid;
  place-items: end start;
  min-height: 220px;
  padding: 20px;
  color: white;
  background:
    linear-gradient(135deg, rgba(23, 32, 42, 0.15), rgba(23, 32, 42, 0.5)),
    linear-gradient(120deg, var(--blue), var(--green));
}

.project-shot.portfolio-tracker {
  background:
    linear-gradient(135deg, rgba(23, 32, 42, 0.05), rgba(23, 32, 42, 0.45)),
    linear-gradient(120deg, #263238, var(--yellow));
}

.project-shot.openclaw-workbench {
  background:
    linear-gradient(135deg, rgba(23, 32, 42, 0.06), rgba(23, 32, 42, 0.5)),
    linear-gradient(120deg, #6b4eff, var(--coral));
}

.project-shot.homecloud {
  background:
    linear-gradient(135deg, rgba(23, 32, 42, 0.04), rgba(23, 32, 42, 0.48)),
    linear-gradient(120deg, #146c94, #243763);
}

.project-shot span {
  max-width: 230px;
  font-size: 2rem;
  font-weight: 850;
  line-height: 1;
}

.project-body {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

h3 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.1;
}

.tagline {
  color: var(--ink);
  font-weight: 750;
}

.project-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span,
.status {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfaf6;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

details {
  margin-top: 4px;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

pre {
  margin: 14px 0 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.private-hero {
  padding: clamp(42px, 7vw, 90px) clamp(20px, 5vw, 72px) 34px;
}

.private-hero h1 {
  max-width: 980px;
  font-size: clamp(2.6rem, 6vw, 5.5rem);
}

.private-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.private-list {
  display: grid;
  gap: 18px;
}

.private-card {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.private-card-header,
.private-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 18px;
}

.private-card h4 {
  margin: 0 0 10px;
}

.private-card p,
dd {
  color: var(--muted);
  line-height: 1.6;
}

dl {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

dt {
  font-weight: 850;
}

dd {
  margin: 0;
}

code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.load-error {
  color: var(--coral);
  font-weight: 800;
}

@media (max-width: 860px) {
  .site-header,
  .hero,
  .private-card-header,
  .private-columns {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 420px;
    border-left: 0;
  }

  .signal-grid {
    inset: 20px 0;
  }

  .orbit-card.middle {
    right: 8%;
  }

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

@media (max-width: 520px) {
  h1 {
    font-size: 2.85rem;
  }

  .hero-visual {
    min-height: 370px;
  }

  .signal-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .orbit-card {
    width: 92%;
    right: 0;
    padding: 16px;
  }

  .orbit-card.top {
    top: 34px;
  }

  .orbit-card.middle {
    top: 150px;
  }

  .orbit-card.bottom {
    top: 266px;
  }
}
