:root {
  color-scheme: light;
  --ink: #17191c;
  --paper: #f6f7f4;
  --panel: #ffffff;
  --muted: #636a73;
  --line: #d9ddd4;
  --green: #b9f34f;
  --teal: #00a49a;
  --coral: #ff6f61;
  --yellow: #ffcf45;
  --blue: #3a86ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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: 24px;
  padding: 16px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid rgba(23, 25, 28, 0.1);
  background: rgba(246, 247, 244, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--green);
  font-size: 0.82rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 680;
}

.nav-links a:hover,
.text-link:hover,
.detail-link:hover,
.repo-row:hover,
.site-footer a:hover {
  color: var(--teal);
}

.hero {
  position: relative;
  min-height: 78svh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 74px clamp(20px, 6vw, 72px) 60px;
  isolation: isolate;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  --tilt-x: 0px;
  --tilt-y: 0px;
  background:
    radial-gradient(circle at 74% 18%, rgba(185, 243, 79, 0.58), transparent 26%),
    radial-gradient(circle at 16% 72%, rgba(255, 111, 97, 0.25), transparent 26%),
    linear-gradient(135deg, #f7f8f3 0%, #f4f7f1 45%, #eef7f5 100%);
}

.grid-layer {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(23, 25, 28, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 28, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.gesture-line {
  position: absolute;
  height: 6px;
  border-radius: 999px;
  background: var(--ink);
  opacity: 0.75;
  transform-origin: left center;
  animation: drift 9s ease-in-out infinite;
}

.line-a {
  top: 22%;
  left: 52%;
  width: 210px;
  background: var(--teal);
  transform: rotate(-18deg);
}

.line-b {
  top: 44%;
  right: 8%;
  width: 180px;
  background: var(--coral);
  transform: rotate(26deg);
  animation-delay: -2s;
}

.line-c {
  left: 8%;
  bottom: 22%;
  width: 250px;
  background: var(--yellow);
  transform: rotate(-8deg);
  animation-delay: -4s;
}

.floating-window {
  position: absolute;
  display: grid;
  align-content: end;
  gap: 6px;
  width: 230px;
  min-height: 154px;
  padding: 42px 18px 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 10px 10px 0 var(--ink);
}

.floating-window::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 30px;
  border-bottom: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.floating-window span {
  position: absolute;
  top: 10px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.floating-window span:nth-child(1) {
  left: 12px;
  background: var(--coral);
}

.floating-window span:nth-child(2) {
  left: 28px;
  background: var(--yellow);
}

.floating-window span:nth-child(3) {
  left: 44px;
  background: var(--green);
}

.floating-window strong {
  font-size: 1.18rem;
}

.floating-window small {
  color: var(--muted);
  font-weight: 700;
}

.window-one {
  right: 10%;
  bottom: 18%;
  transform: translate(var(--tilt-x), var(--tilt-y)) rotate(3deg);
}

.window-two {
  right: 27%;
  top: 20%;
  transform: translate(var(--tilt-x), var(--tilt-y)) rotate(-6deg);
}

.code-ribbon {
  position: absolute;
  left: clamp(330px, 31vw, 470px);
  top: 18%;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: min(330px, 28vw);
}

.code-ribbon span {
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.86rem;
  font-weight: 800;
}

.hero-content {
  width: min(820px, 100%);
  padding-top: 18px;
}

.avatar {
  display: block;
  width: 168px;
  height: 168px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 10px 10px 0 var(--green);
}

.eyebrow,
.section-kicker {
  margin: 24px 0 12px;
  color: var(--teal);
  font-size: 0.83rem;
  font-weight: 860;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 16px;
  font-size: 5.2rem;
  line-height: 0.95;
}

h2 {
  margin-bottom: 18px;
  font-size: 2.35rem;
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 650px;
  color: #2c3035;
  font-size: 1.25rem;
  line-height: 1.55;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-weight: 820;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

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

.secondary {
  background: var(--green);
}

.blog-button {
  background: var(--yellow);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--panel);
}

.metrics div {
  min-height: 112px;
  padding: 22px clamp(18px, 4vw, 44px);
  border-right: 2px solid var(--ink);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  margin-bottom: 8px;
  font-size: 2rem;
}

.metrics span {
  color: var(--muted);
  font-weight: 700;
}

.section,
.code-panel {
  padding: 88px clamp(20px, 6vw, 72px);
}

.intro {
  max-width: 1020px;
}

.intro p,
.craft p,
.project-card p {
  color: var(--muted);
  line-height: 1.72;
}

.intro p {
  max-width: 780px;
  font-size: 1.12rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.text-link,
.detail-link,
.site-footer a {
  font-weight: 820;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.74fr);
  gap: 24px;
  align-items: start;
}

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

.project-card {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 6px 6px 0 rgba(23, 25, 28, 0.18);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.project-card:hover,
.project-card.selected {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ink);
}

.project-card.selected {
  background: #faffef;
}

.project-card.featured {
  background: #faffef;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.language {
  padding: 6px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
}

.project-card-action {
  align-self: flex-start;
  margin-top: 18px;
  font-size: 0.92rem;
  font-weight: 860;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.swift {
  background: var(--coral);
}

.python {
  background: var(--yellow);
}

.cpp {
  background: var(--green);
}

.ruby,
.javascript {
  background: #f0d4ff;
}

.dart {
  background: #86d7ff;
}

.other {
  background: #e5e8dd;
}

.project-detail,
.language-panel,
.repo-panel {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 6px 6px 0 rgba(23, 25, 28, 0.18);
}

.project-detail {
  position: sticky;
  top: 86px;
  padding: 24px;
}

.detail-empty p,
.detail-intro,
.detail-list,
.detail-signal {
  color: var(--muted);
  line-height: 1.68;
}

.detail-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.detail-top .section-kicker {
  margin-top: 0;
}

.detail-link {
  flex: 0 0 auto;
  font-size: 0.94rem;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.detail-stats span {
  min-height: 76px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #f7f8f3;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.detail-stats strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1.02rem;
}

.detail-list {
  margin: 0;
  padding-left: 20px;
}

.detail-list li + li {
  margin-top: 10px;
}

.detail-signal {
  margin: 22px 0 0;
  padding: 14px;
  border-left: 5px solid var(--green);
  background: #faffef;
  font-weight: 720;
}

.live-data {
  padding-top: 0;
}

.data-status {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 760;
}

.data-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  gap: 24px;
}

.language-panel,
.repo-panel {
  padding: 24px;
}

.language-bars {
  display: grid;
  gap: 16px;
}

.language-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.language-row strong,
.language-row span {
  display: block;
}

.language-row span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 720;
}

.bar-track {
  height: 16px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #f7f8f3;
}

.bar-track span {
  display: block;
  height: 100%;
  min-width: 8px;
  background: var(--green);
}

.repo-list {
  display: grid;
  gap: 12px;
}

.repo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.repo-row:last-child {
  border-bottom: 0;
}

.repo-row strong,
.repo-row small,
.repo-row time {
  display: block;
}

.repo-row small,
.repo-row time {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 720;
}

.craft {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: #edf7f4;
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 34px;
}

.code-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(300px, 1fr);
  gap: 34px;
  align-items: start;
}

pre {
  overflow: auto;
  margin: 0;
  padding: 26px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #16181c;
  color: #f5f7f0;
  box-shadow: 8px 8px 0 var(--green);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.96rem;
  line-height: 1.7;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 6vw, 72px);
  border-top: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.94rem;
}

@keyframes drift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 16px -10px;
  }
}

@media (max-width: 1100px) {
  .project-layout,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .project-detail {
    position: static;
  }

  .window-two {
    right: 14%;
    top: 18%;
  }
}

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

  .nav-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    min-height: 76svh;
    padding-top: 44px;
  }

  .hero-scene {
    opacity: 0.92;
  }

  .floating-window,
  .code-ribbon {
    display: none;
  }

  .avatar {
    width: 132px;
    height: 132px;
  }

  h1 {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 1.86rem;
  }

  .hero-copy {
    font-size: 1.06rem;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics div:nth-child(2) {
    border-right: 0;
  }

  .metrics div:nth-child(-n + 2) {
    border-bottom: 2px solid var(--ink);
  }

  .section,
  .code-panel {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .section-heading,
  .site-footer {
    display: block;
  }

  .project-layout,
  .project-grid,
  .craft-grid,
  .code-panel,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .detail-stats,
  .language-row {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 260px;
  }

  .site-footer a {
    display: inline-block;
    margin-top: 12px;
  }
}

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

  .gesture-line {
    animation: none;
  }

  .button {
    transition: none;
  }

  .project-card {
    transition: none;
  }
}
