html, body {
  margin: 0;
  min-height: 100%;
  background: oklch(0.155 0.006 260);
  color: oklch(0.95 0.004 260);
  font-family: "Instrument Sans", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(oklch(0.98 0 0 / 0.022) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.98 0 0 / 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid oklch(0.26 0.006 260);
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
}

.logo-dot {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: oklch(0.8 0.15 75);
  display: inline-block;
}

.logo-text {
  font-family: Archivo, Helvetica, sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 26px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav a { color: oklch(0.6 0.006 260); transition: color .2s ease; }
.nav a.nav-active { color: oklch(0.8 0.15 75); }
.nav a:hover:not(.nav-active) { color: oklch(0.95 0.004 260); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(20px, 3vh, 44px) clamp(20px, 4vw, 56px) 88px;
  overflow: hidden;
}

.field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
}

.hero-content { max-width: 700px; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid oklch(0.42 0.1 75);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: oklch(0.84 0.14 75);
  margin-bottom: clamp(16px, 3vh, 30px);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: oklch(0.8 0.15 75);
  display: inline-block;
}

.headline {
  font-family: Archivo, Helvetica, sans-serif;
  font-weight: 800;
  font-size: clamp(42px, 7.4vw, 100px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin: 0 0 clamp(16px, 3vh, 28px);
}

.accent-dot { color: oklch(0.8 0.15 75); }

.hero-desc {
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.65;
  max-width: 48ch;
  color: oklch(0.72 0.006 260);
  margin: 0 0 clamp(20px, 3.5vh, 34px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 22px;
  border-radius: 4px;
}

.btn-primary {
  background: oklch(0.8 0.15 75);
  color: oklch(0.16 0.02 75);
  font-weight: 500;
}
.btn-primary:hover {
  background: oklch(0.88 0.15 75);
  color: oklch(0.16 0.02 75);
}

.btn-secondary {
  border: 1px solid oklch(0.32 0.006 260);
}
.btn-secondary:hover {
  border-color: oklch(0.6 0.006 260);
  color: oklch(0.95 0.004 260);
}

/* ---------- Status bar ---------- */
.statusbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px clamp(20px, 4vw, 56px);
  border-top: 1px solid oklch(0.24 0.006 260);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: oklch(0.5 0.006 260);
}

.statusbar-right { color: oklch(0.68 0.11 75); }

/* ---------- Keycap board ---------- */
.board-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.scene {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1 / 0.76;
  perspective: 1300px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.board {
  position: relative;
  width: 320px;
  height: 254px;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-32deg);
  will-change: transform;
}

.board-layer {
  position: absolute;
  inset: -26px;
  border-radius: 24px;
}

.capgrid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 56px);
  grid-auto-rows: 56px;
  gap: 10px;
  transform-style: preserve-3d;
}

.cap {
  position: relative;
  width: 56px;
  height: 56px;
  transform-style: preserve-3d;
  cursor: pointer;
  transition: transform .9s cubic-bezier(.22,.9,.25,1);
}

.cap-box {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .18s ease;
}
.cap:hover .cap-box { transform: translateZ(-7px); }

.capgrid.floating .cap-box { animation: bob 4.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateZ(0); }
  50% { transform: translateZ(15px); }
}

.cap-face {
  position: absolute;
  inset: 0;
  transform: translateZ(26px);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  box-shadow: inset 0 2px 0 oklch(1 0 0 / 0.2), inset 0 -4px 8px oklch(0 0 0 / 0.28);
  user-select: none;
}
.cap-face.large { font-size: 19px; letter-spacing: 0.01em; }

.board-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pill-accent {
  border: 1px solid oklch(0.42 0.1 75);
  color: oklch(0.86 0.14 75);
}
.pill-accent:hover {
  background: oklch(0.8 0.15 75 / 0.12);
  color: oklch(0.9 0.14 75);
}

.pill-plain {
  border: 1px solid oklch(0.32 0.006 260);
  color: oklch(0.72 0.006 260);
  padding: 10px 18px;
}
.pill-plain:hover {
  border-color: oklch(0.6 0.006 260);
  color: oklch(0.92 0.004 260);
}

.board-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: oklch(0.5 0.006 260);
  text-align: center;
}

/* ---------- Work section ---------- */
.panel {
  padding: clamp(28px, 5vh, 60px) clamp(20px, 4vw, 56px) 96px;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid oklch(0.26 0.006 260);
  padding-bottom: 16px;
  max-width: 1060px;
}

.panel-title {
  font-family: Archivo, Helvetica, sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 56px);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin: 0;
}

.panel-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.07em;
  color: oklch(0.55 0.006 260);
}

.project-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(0, 230px);
  gap: 30px;
  padding: 30px 0;
  border-bottom: 1px solid oklch(0.24 0.006 260);
  max-width: 1060px;
  align-items: start;
  transition: background .25s ease, padding-left .25s ease;
}
.project-row:hover {
  background: oklch(0.19 0.008 260);
  padding-left: 14px;
}

.project-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: oklch(0.75 0.13 75);
  padding-top: 8px;
  letter-spacing: 0.05em;
}

.project-title {
  font-family: Archivo, Helvetica, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 11px;
}

.project-blurb {
  font-size: 15.5px;
  line-height: 1.62;
  color: oklch(0.72 0.006 260);
  margin: 0 0 16px;
  max-width: 52ch;
}

.project-points {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.project-point {
  display: grid;
  grid-template-columns: 15px 1fr;
  gap: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: oklch(0.62 0.006 260);
}
.project-point span {
  color: oklch(0.6 0.1 75);
  font-family: 'JetBrains Mono', monospace;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: oklch(0.62 0.006 260);
  border: 1px solid oklch(0.3 0.006 260);
  border-radius: 3px;
  padding: 4px 9px;
}

.project-shot {
  border: 1px solid oklch(0.27 0.006 260);
  border-radius: 3px;
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(135deg, oklch(0.2 0.006 260) 0 6px, oklch(0.17 0.006 260) 6px 12px);
  display: flex;
  align-items: flex-end;
  padding: 11px;
}

.project-shot span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.05em;
  color: oklch(0.5 0.006 260);
}

@media (max-width: 1080px) {
  .project-row { grid-template-columns: 40px minmax(0, 1fr); }
  .project-shot { display: none; }
}

/* ---------- Placeholder sections ---------- */
.placeholder-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: oklch(0.55 0.006 260);
  margin-top: 24px;
}