:root {
  --paper: #f7f7f3;
  --ink: #0c1220;
  --muted: #596273;
  --blue: #1558ee;
  --line: #dadde2;
  --dark: #14202d;
  --soft: #edf2ff;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button, input, select {
  font: inherit;
}

button, a, input, select {
  -webkit-tap-highlight-color: transparent;
}

button, a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

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

button:disabled {
  cursor: wait;
  opacity: .55;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #8eb1ff;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.wrap {
  max-width: 1240px;
  margin: auto;
  padding: 0 32px;
}

.skip {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 20;
  background: white;
  padding: 10px;
}

.skip:focus {
  top: 10px;
}

header {
  border-bottom: 1px solid var(--line);
  background: rgba(247,247,243, .96);
  position: sticky;
  top: 0;
  z-index: 5;
}

.nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1.6px;
}

.blue {
  color: var(--blue);
}

nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav a {
  font-size: 14px;
  position: relative;
  padding: 27px 0;
}

nav a[aria-current="page"]:after {
  content: "";
  height: 2px;
  background: var(--blue);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.eyebrow {
  font: 600 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--blue);
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 56px;
  padding: 72px 0 64px;
  align-items: start;
}

.hero h1 {
  font-size: clamp(40px,4.2vw,60px);
  line-height: 1.09;
  letter-spacing: -2.8px;
  margin: 19px 0 23px;
  max-width: 570px;
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 490px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  padding: 12px 21px;
  color: var(--blue);
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  min-height: 46px;
}

.btn.primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 5px 16px #1558ee13;
}

.btn:hover {
  background: var(--soft);
}

.btn.primary:hover {
  background: #0846d1;
}

.btn.small {
  padding: 8px 13px;
  min-height: 36px;
  font-size: 12px;
}

.availability {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: #95a0af;
  flex-shrink: 0;
}

.dot.green {
  background: #22966a;
}

.hero-art {
  position: relative;
  isolation: isolate;
}

.hero-art:before {
  content: "";
  position: absolute;
  inset: -18px -18px 22px 35px;
  border-radius: 14px;
  background: #dce5ff;
  z-index: -1;
}

.window {
  border: 1px solid #344354;
  border-radius: var(--radius);
  background: var(--dark);
  color: #dce4ef;
  overflow: hidden;
  box-shadow: 0 18px 40px #1c294c0c;
}

.window-bar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  background: #1c2a3a;
  border-bottom: 1px solid #334153;
}

.traffic {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fb746c;
}

.traffic:nth-child(2) {
  background: #f6c44b;
}

.traffic:nth-child(3) {
  background: #40c980;
}

.window-label {
  font: 10px ui-monospace, monospace;
  color: #99abc3;
  margin-left: auto;
  letter-spacing: .5px;
}

.architecture {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  min-height: 315px;
}

.code {
  padding: 28px 21px;
  font: 12px/1.9 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
  color: #bbc9dc;
  margin: 0;
  border-right: 1px solid #334153;
}

.yellow {
  color: #f2cd65;
}

.pink {
  color: #fc8c9e;
}

.cyan {
  color: #8cd3ff;
}

.comment {
  color: #8395ad;
}

.flow {
  padding: 21px 19px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #536b8b;
  border-radius: 8px;
  padding: 13px 12px;
  background: #ffffff04;
}

.flow-icon {
  font-size: 25px;
  color: #6d9cff;
}

.flow-node strong {
  font-size: 12px;
  display: block;
}

.flow-node small {
  font-size: 10px;
  color: #a4b6d0;
  display: block;
  margin-top: 3px;
}

.flow-arrow {
  color: #a4b6d0;
  text-align: center;
  font-size: 17px;
}

.section {
  padding: 46px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 23px;
}

.section h2 {
  font-size: 32px;
  letter-spacing: -1.2px;
  line-height: 1.2;
  margin: 7px 0 0;
}

.section-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}

.project-card {
  display: block;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  width: 100%;
  color: var(--ink);
  transition: border-color .2s, transform .2s;
}

.project-card:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
}

.card-body {
  padding: 16px 9px 9px;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  gap: 12px;
  letter-spacing: -.4px;
}

.card-title .number {
  font: 12px ui-monospace, monospace;
  margin-right: 8px;
  color: var(--muted);
}

.project-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  min-height: 42px;
  margin: 9px 0 14px;
}

.stack {
  font: 10px/1.7 ui-monospace, monospace;
  color: var(--muted);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.preview {
  height: 190px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  position: relative;
  pointer-events: none;
}

.mini-nav {
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  border-bottom: 1px solid #eee;
}

.mini-nav strong {
  font-size: 12px;
  letter-spacing: -.5px;
}

.mini-home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 20px;
  gap: 16px;
}

.mini-home h4 {
  font-size: 23px;
  line-height: 1.05;
  letter-spacing: -1px;
  margin: 0 0 8px;
}

.mini-home small {
  font-size: 8px;
  line-height: 1.6;
  display: block;
  color: var(--muted);
}

.mini-pill {
  display: inline-block;
  background: var(--blue);
  color: white;
  font-size: 7px;
  padding: 6px 10px;
  margin-top: 12px;
  border-radius: 3px;
}

.mini-shape {
  background: #dce5ff;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

.mini-shape:before, .mini-shape:after {
  content: "";
  position: absolute;
  inset: 40% -10% -20%;
  background: #a8bce6;
  transform: rotate(-22deg);
  border-radius: 30px;
}

.mini-shape:after {
  inset: 66% -10% -15%;
  background: #7491c1;
  transform: rotate(20deg);
}

.mini-inventory {
  display: grid;
  grid-template-columns: 28% 1fr;
  height: 100%;
}

.mini-side {
  background: #14202d;
  color: #dce4ef;
  padding: 15px 9px;
  font-size: 8px;
}

.mini-side b {
  display: block;
  margin-bottom: 17px;
  font-size: 9px;
}

.mini-side span {
  display: block;
  padding: 6px;
  border-radius: 4px;
  margin: 2px 0;
}

.mini-side span:first-of-type {
  background: #234d87;
}

.mini-main {
  padding: 14px 12px;
  min-width: 0;
}

.mini-main h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.mini-search {
  font-size: 7px;
  border: 1px solid #e0e3e8;
  padding: 4px 6px;
  color: #8b94a3;
  border-radius: 3px;
  margin-bottom: 7px;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 7px;
}

.mini-table td, .mini-table th {
  text-align: left;
  border: 1px solid #e4e7ec;
  padding: 5px 4px;
}

.mini-table th {
  background: #f5f6f8;
  font-weight: 500;
}

.terminal {
  height: 100%;
  background: #14202d;
  color: #dce4ef;
  font: 10px/1.55 ui-monospace, monospace;
}

.terminal .window-bar {
  height: 27px;
  padding: 0 11px;
}

.terminal pre {
  padding: 12px 16px;
  margin: 0;
}

.terminal .window-label {
  font-size: 8px;
}

.mini-resources {
  padding: 22px;
  background: #14202d;
  height: 100%;
  color: white;
  font-size: 10px;
}

.mini-resources h4 {
  font-size: 14px;
  margin: 0 0 18px;
}

.resource-line {
  margin: 12px 0;
}

.meter {
  height: 7px;
  background: #334153;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.meter>span {
  display: block;
  height: 100%;
  background: #6799ff;
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}

.resume-grid h3 {
  font-size: 15px;
  margin: 0 0 20px;
}

.entry {
  padding: 0 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.entry:last-child {
  margin-bottom: 0;
}

.entry strong {
  font-size: 16px;
}

.entry p {
  font-size: 14px;
  color: var(--muted);
  margin: 5px 0;
}

.entry .meta {
  font: 11px/1.8 ui-monospace, monospace;
  color: var(--blue);
  margin-top: 7px;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 30px;
  margin-top: 32px;
}

.skill-groups h3 {
  font-size: 14px;
  margin: 0 0 10px;
}

.skill-groups p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
  margin: 0;
}

.page-intro {
  padding: 52px 0 30px;
}

.page-intro h1 {
  font-size: 48px;
  line-height: 1.15;
  letter-spacing: -2px;
  margin: 13px 0 12px;
}

.page-intro p {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
  max-width: 760px;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 5px 0 45px;
}

.project-row {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 9px;
  text-align: left;
  display: grid;
  grid-template-columns: 34% 1fr 110px;
  align-items: center;
  gap: 32px;
  padding: 13px;
  color: var(--ink);
  width: 100%;
  transition: border-color .2s;
}

.project-row:hover {
  border-color: var(--blue);
}

.project-row .preview {
  height: 195px;
}

.project-row h2 {
  font-size: 25px;
  letter-spacing: -.8px;
  line-height: 1.2;
  margin: 8px 0 9px;
}

.project-row p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 17px;
}

.project-number {
  font: 12px ui-monospace, monospace;
  color: var(--muted);
}

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

.tag {
  border: 1px solid #d0d5de;
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 11px;
  color: #394355;
  display: inline-block;
}

.row-cta {
  text-align: center;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.plus {
  background: var(--blue);
  color: white;
  font-size: 32px;
  line-height: 1;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 9px;
  font-weight: 300;
}

.status {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding: 15px 0 55px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
}

.contact-card h2 {
  font-size: 22px;
  margin: 0 0 10px;
  letter-spacing: -.5px;
}

.contact-card p {
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.field {
  display: block;
  width: 100%;
  border: 1px solid #cdd3dd;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  margin: 8px 0 15px;
}

.contact-card label {
  font-size: 13px;
}

.form-status {
  min-height: 24px;
  margin-bottom: 0 !important;
  font-size: 13px !important;
}

.bottom-cta {
  border-top: 1px solid var(--line);
  padding: 27px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.bottom-cta strong {
  font-size: 18px;
  letter-spacing: -.5px;
}

.bottom-cta p {
  font-size: 13px;
  color: var(--muted);
  margin: 2px 0;
}

footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--muted);
  font-size: 11px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--blue);
}

.project-detail-grid {
  padding: 28px 34px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
}

.demo {
  border: 1px solid #ccd3df;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  align-self: start;
}

.demo-head {
  background: #172534;
  color: #dce4ef;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 16px;
}

.demo-content {
  padding: 20px;
}

.demo-content h3 {
  font-size: 20px;
  letter-spacing: -.6px;
  margin: 0 0 12px;
}

.demo-caption {
  padding: 10px 16px;
  background: #eff2f7;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid #dbe0e8;
}

.details h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

.details p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.7;
}

.details .actions {
  margin: 16px 0 0;
}

.table-scroll {
  overflow-x: auto;
}

.inventory-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  margin: 14px 0;
}

.inventory-table th, .inventory-table td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #e4e7ed;
}

.inventory-table th {
  background: #f1f3f7;
  font-weight: 600;
}

.delete-item {
  border: 0;
  background: #f7e9e9;
  color: #9b2d37;
  padding: 3px 8px;
  border-radius: 4px;
  min-height: 28px;
}

.add-form {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 9px;
}

.add-form .field {
  margin: 6px 0;
}

.add-form button {
  grid-column: 1/-1;
}

.demo label {
  font-size: 12px;
  color: #536073;
}

.demo .field {
  padding: 8px 10px;
  font-size: 13px;
}

.matrix-inputs {
  display: grid;
  grid-template-columns: 1fr 24px 90px;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
}

.matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.matrix-vector {
  display: grid;
  gap: 6px;
}

.matrix-inputs input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cdd3dd;
  border-radius: 5px;
  padding: 9px;
  background: #f7f9fc;
  color: #25354a;
}

.matrix-result {
  background: #edf3ff;
  border: 1px solid #cadbff;
  border-radius: 6px;
  padding: 12px;
  margin-top: 14px;
  font: 13px/1.7 ui-monospace, monospace;
  min-height: 70px;
}

.simulation-row {
  margin: 17px 0;
}

.simulation-row input {
  width: 100%;
  accent-color: var(--blue);
}

.simulation-row .meter {
  height: 12px;
  background: #e5eaf2;
}

.simulation-row .meter>span {
  background: var(--blue);
  transition: width .15s;
}

.simulation-row p {
  font-size: 12px;
  margin: 4px 0;
  color: var(--muted);
}

.flow-demo {
  display: grid;
  gap: 8px;
}

.flow-demo button {
  border: 1px solid #ccd4e2;
  border-radius: 7px;
  background: #f4f7fc;
  padding: 12px;
  text-align: left;
  font-size: 13px;
  color: var(--ink);
}

.flow-demo button[aria-pressed="true"] {
  border-color: var(--blue);
  background: #e8efff;
}

.flow-description {
  font-size: 13px;
  color: var(--muted);
  min-height: 90px;
  margin: 14px 0 0;
}

.demo-hint {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0 0;
}

.view {
  animation: enter .25s ease;
}

@keyframes enter {
  from {
    opacity: .4;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

@media (min-width: 1400px) {
  .wrap {
    max-width: 1380px;
  }

  .hero {
    gap: 70px;
  }

  .hero h1 {
    font-size: 58px;
  }

  .architecture {
    min-height: 350px;
  }

  .code {
    font-size: 13px;
    padding: 30px;
  }

  .flow-node {
    padding: 16px;
  }

  .preview {
    height: 215px;
  }

}

@media (max-width: 900px) {
  .wrap {
    padding: 0 24px;
  }

  .hero {
    gap: 30px;
  }

  .hero h1 {
    font-size: 44px;
  }

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

  .code {
    border-right: 0;
    border-bottom: 1px solid #334153;
    min-height: 220px;
    font-size: 11px;
  }

  .flow {
    flex-direction: row;
    padding: 15px;
    gap: 5px;
  }

  .flow-node {
    padding: 8px;
    flex: 1;
    display: block;
  }

  .flow-icon {
    font-size: 17px;
  }

  .flow-node small {
    display: none;
  }

  .flow-arrow {
    transform: rotate(-90deg);
    align-self: center;
  }

  .hero p {
    font-size: 16px;
  }

  .cards {
    gap: 12px;
  }

  .preview {
    height: 170px;
  }

  .mini-home {
    padding: 14px;
  }

  .mini-home h4 {
    font-size: 20px;
  }

  .mini-main {
    padding: 12px 8px;
  }

  .mini-side {
    padding: 13px 6px;
  }

  .project-row {
    grid-template-columns: 32% 1fr 85px;
    gap: 20px;
  }

  .project-row h2 {
    font-size: 21px;
  }

  .project-row .preview {
    height: 180px;
  }

  .project-detail-grid {
    gap: 24px;
    grid-template-columns: 1fr 1fr;
  }

  .resume-grid {
    gap: 40px;
  }

}

@media (max-width: 650px) {
  .wrap {
    padding: 0 20px;
  }

  .nav {
    height: 65px;
    gap: 15px;
  }

  .brand {
    font-size: 25px;
  }

  nav {
    gap: 16px;
  }

  nav a {
    font-size: 12px;
    padding: 23px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 42px 0 40px;
    gap: 44px;
  }

  .hero h1 {
    font-size: 47px;
    letter-spacing: -2px;
    max-width: 510px;
  }

  .hero-art {
    margin-right: 12px;
  }

  .architecture {
    grid-template-columns: 1.35fr 1fr;
    min-height: 270px;
  }

  .code {
    border-right: 1px solid #334153;
    border-bottom: 0;
    padding: 20px 13px;
    font-size: 9px;
    min-height: 0;
  }

  .flow {
    flex-direction: column;
    padding: 12px;
  }

  .flow-node {
    display: flex;
    padding: 10px 8px;
    flex: 0;
    gap: 8px;
  }

  .flow-node strong {
    font-size: 10px;
  }

  .flow-node small {
    display: block;
    font-size: 9px;
  }

  .flow-arrow {
    transform: none;
  }

  .section {
    padding: 33px 0;
  }

  .section h2 {
    font-size: 28px;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 10px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .preview {
    height: 210px;
  }

  .mini-home {
    padding: 22px 28px;
  }

  .mini-home h4 {
    font-size: 29px;
  }

  .mini-main {
    padding: 20px;
  }

  .mini-side {
    padding: 20px 13px;
  }

  .mini-table {
    font-size: 9px;
  }

  .mini-table td, .mini-table th {
    padding: 6px;
  }

  .mini-search {
    font-size: 9px;
  }

  .mini-main h4 {
    font-size: 20px;
  }

  .mini-side {
    font-size: 10px;
  }

  .mini-side b {
    font-size: 12px;
  }

  .terminal {
    font-size: 12px;
  }

  .terminal pre {
    padding: 18px 23px;
  }

  .project-card p {
    min-height: 0;
  }

  .resume-grid, .skill-groups, .contact-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-intro {
    padding: 36px 0 25px;
  }

  .page-intro h1 {
    font-size: 38px;
  }

  .page-intro p {
    font-size: 16px;
  }

  .project-row {
    grid-template-columns: 1fr 60px;
    gap: 18px;
    padding: 12px;
  }

  .project-row .preview {
    grid-column: 1/-1;
    height: 210px;
  }

  .project-row h2 {
    font-size: 23px;
  }

  .row-cta {
    font-size: 10px;
  }

  .plus {
    height: 43px;
    width: 43px;
    font-size: 27px;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 25px;
  }

  .bottom-cta {
    align-items: start;
  }

  .bottom-cta strong {
    font-size: 16px;
  }

  .bottom-cta .btn {
    font-size: 12px;
    padding: 10px 14px;
    white-space: nowrap;
  }

  .contact-card {
    padding: 22px;
  }

  .footer-inner {
    gap: 14px;
  }

  .footer-links {
    gap: 17px;
  }

}

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

  *,*:before,*:after {
    animation: none !important;
    transition: none !important;
  }

}

/* Layout refinements and expandable project details. */
.hero > *,
.architecture > *,
.project-row > * {
  min-width: 0;
}

.code {
  padding: 24px 16px;
  font-size: clamp(9px, 0.8vw, 12px);
  line-height: 1.8;
}

.code code {
  font: inherit;
}

.preview {
  height: 230px;
}

.project-row .preview {
  height: 215px;
}

.mini-home {
  height: calc(100% - 37px);
  padding: 16px;
}

.mini-main {
  padding: 12px 10px;
}

.mini-table th,
.mini-table td {
  padding: 5px 4px;
}

.project-entry {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}

.project-entry:hover,
.project-entry.is-open {
  border-color: var(--blue);
}

.project-entry .project-row {
  border: 0;
  border-radius: 0;
}

.project-entry.is-open .project-row {
  grid-template-columns: 1fr 110px;
  padding: 24px;
}

.project-entry.is-open .project-row > .preview {
  display: none;
}

.project-panel {
  padding: 0 24px 24px;
}

.project-panel .project-detail-grid {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.project-panel .details h3 {
  margin-top: 0;
}

.project-panel .details p + h3 {
  margin-top: 28px;
}

.project-panel-note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 40px;
  }

  .architecture {
    grid-template-columns: 1.4fr 1fr;
  }

  .code {
    border-right: 1px solid #334153;
    border-bottom: 0;
    font-size: 12px;
  }

  .flow {
    flex-direction: column;
  }

  .flow-node {
    display: flex;
    flex: 0;
  }

  .flow-node small {
    display: block;
  }

  .flow-arrow {
    transform: none;
  }

  .preview,
  .project-row .preview {
    height: 220px;
  }
}

@media (max-width: 650px) {
  .hero h1 {
    font-size: clamp(34px, 8vw, 47px);
  }

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

  .code {
    border-right: 0;
    border-bottom: 1px solid #334153;
    font-size: 11px;
  }

  .flow {
    padding: 16px;
    gap: 6px;
  }

  .flow-node {
    padding: 10px;
  }

  .project-entry.is-open .project-row {
    grid-template-columns: 1fr 64px;
    gap: 12px;
    padding: 16px;
  }

  .project-panel {
    padding: 0 16px 16px;
  }

  .project-panel .project-detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .row-cta {
    font-size: 11px;
  }
}

@media (max-width: 650px) {
  .mini-home {
    padding: 14px;
  }

  .mini-home h4 {
    font-size: 24px;
  }

  .mini-main {
    padding: 10px;
  }

  .mini-main h4 {
    font-size: 15px;
    margin-bottom: 8px;
  }

  .mini-side {
    padding: 12px 8px;
    font-size: 8px;
  }

  .mini-side b {
    font-size: 8px;
  }

  .mini-table {
    font-size: 8px;
  }

  .mini-table td,
  .mini-table th {
    padding: 4px;
  }
}

/* Inventory categories and three-variable matrix previews. */
.terminal pre {
  font-size: 9px;
  line-height: 1.35;
  padding: 12px 16px;
}

.mini-table {
  width: 100%;
  font-size: 7px;
  table-layout: auto;
}

.mini-table th,
.mini-table td {
  padding: 5px 3px;
}

.mini-table th {
  white-space: nowrap;
}

.inventory-table {
  min-width: 480px;
}

.add-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.add-form > * {
  min-width: 0;
}

.add-form button {
  grid-column: 1 / -1;
}

.matrix-inputs {
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.matrix-block {
  min-width: 0;
}

.matrix-label {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

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

.matrix-vector {
  gap: 8px;
}

.matrix-inputs input {
  width: 100%;
  min-width: 0;
  padding: 10px 4px;
  text-align: center;
}

@media (max-width: 650px) {
  .add-form {
    grid-template-columns: 1fr;
  }

  .matrix-inputs {
    gap: 10px;
  }

  .matrix-grid,
  .matrix-vector {
    gap: 5px;
  }

  .mini-table {
    font-size: 7px;
  }

  .terminal pre {
    font-size: 9px;
    line-height: 1.35;
  }
}

/* Real application screenshots preserve their proportions at every size. */
.application-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #eef3f7;
}

.application-preview-link {
  display: block;
}

.application-detail-screenshot {
  display: block;
  width: 100%;
  height: auto;
}

.application-preview-actions {
  padding: 20px;
  border-top: 1px solid var(--line);
}

.application-preview-actions p {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.skill-groups {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-learning {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #edf2ff;
}

.project-learning h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.project-learning p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 1000px) {
  .skill-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .skill-groups {
    grid-template-columns: 1fr;
  }
}
