:root {
  color-scheme: dark;
  --bg: #02080c;
  --panel: #071118;
  --panel-2: #091821;
  --line: #243643;
  --line-bright: #3d5361;
  --text: #f5fbff;
  --muted: #a9bac4;
  --green: #4ade63;
  --green-dark: #1c8e35;
  --amber: #ffbd43;
  --cyan: #36d7d0;
  --blue: #55a7ff;
  --red: #ff5a4f;
  --purple: #a855f7;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
  line-height: 1.6;
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.36;
}

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

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

.site-shell {
  display: flex;
  flex-direction: column;
  width: min(1500px, calc(100vw - 32px));
  height: calc(100dvh - 24px);
  min-height: 680px;
  margin: 12px auto;
  overflow: hidden;
  border: 1px solid var(--line-bright);
  background: rgba(4, 14, 20, 0.94);
  box-shadow: 0 18px 50px var(--shadow);
}

.site-shell.wide {
  width: min(1500px, calc(100vw - 32px));
}

.site-header,
.site-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 44px;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  margin-top: auto;
  padding-block: 13px;
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--text);
  font-size: 13px;
  text-transform: uppercase;
}

.heart {
  color: var(--red);
  font-weight: 700;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  color: var(--green);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 26px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav a {
  color: var(--text);
  transition: color 150ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.active {
  color: var(--green);
}

main {
  padding: 34px 54px 24px;
}

.site-shell > main {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: var(--green) rgba(36, 54, 67, 0.4);
  scrollbar-width: thin;
}

.site-shell > main::-webkit-scrollbar {
  width: 10px;
}

.site-shell > main::-webkit-scrollbar-track {
  background: rgba(36, 54, 67, 0.25);
}

.site-shell > main::-webkit-scrollbar-thumb {
  border: 2px solid rgba(4, 14, 20, 0.94);
  background: var(--green);
}

.hero-grid,
.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1fr);
  gap: 42px;
  align-items: center;
}

.hero-grid {
  align-content: center;
}

.about-layout {
  grid-template-columns: minmax(0, 1fr) 260px;
}

.contact-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1,
.page-title {
  color: var(--text);
  font-size: clamp(38px, 4.9vw, 68px);
  line-height: 1.08;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 span,
.page-title,
.page-title span {
  color: var(--green);
}

.page-title {
  margin: 0 0 20px;
  font-size: clamp(32px, 4vw, 48px);
}

.hero-lede,
.copy-block {
  max-width: 620px;
  color: var(--text);
  font-size: 15px;
}

.copy-block p {
  margin-bottom: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-bright);
  background: #0b151c;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button.primary {
  border-color: #7af28a;
  background: var(--green);
  color: #001307;
}

.button span {
  margin-right: 10px;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--green);
}

.pixel-frame {
  border: 1px solid var(--line-bright);
  background: #061016;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.24);
}

.hero-art {
  position: relative;
  isolation: isolate;
  padding: 10px;
  overflow: hidden;
}

.hero-art img,
.mailbox-card img {
  width: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.hero-art img {
  transform: translateZ(0);
}

.portrait-card {
  padding: 14px;
}

.mailbox-card {
  padding: 12px;
}

.profile-list {
  display: grid;
  gap: 10px;
  max-width: 620px;
  margin: 22px 0 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: baseline;
}

.profile-list dt {
  color: var(--green);
  font-weight: 700;
}

.profile-list dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.profile-list a,
.contact-row:hover small,
.contact-row:focus-visible small {
  color: var(--green);
}

.skill-section {
  padding: 10px 0 12px;
  border-top: 1px dashed var(--line-bright);
}

.skill-section:first-of-type {
  border-top: 0;
}

.skill-section h2 {
  margin-bottom: 9px;
  color: var(--green);
  font-size: 14px;
  text-transform: uppercase;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.skill-tile {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: transform 150ms ease, border-color 150ms ease;
}

.skill-tile:hover {
  transform: translateY(-2px);
  border-color: currentColor;
}

.html { color: #ff7043; }
.css { color: #65a7ff; }
.js { color: #ffd84d; }
.react { color: #61dafb; }
.next { color: #f5fbff; }
.ts { color: #4aa3ff; }
.tailwind { color: #38d7ca; }
.rtk { color: #a855f7; }
.tanstack { color: #ff5a4f; }
.antd { color: #55a7ff; }
.node { color: #63d471; }
.express { color: #f0f4f8; }
.python { color: #ffd166; }
.nest { color: #ff5f6d; }
.java { color: #ff8f42; }
.kafka { color: #e8e8e8; }
.codex { color: #4ade63; }
.claude { color: #ff9f63; }
.mongo { color: #4bdd67; }
.postgres { color: #86b7ff; }
.mysql { color: #45c7ff; }
.git { color: #ff7043; }
.docker { color: #55a7ff; }
.github { color: #f5fbff; }
.fork { color: #ffbd43; }
.tailscale { color: #c9d1d9; }
.aws { color: #ffbd43; }
.vscode { color: #55a7ff; }

.project-list {
  display: grid;
  gap: 14px;
}

.project-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line-bright);
  background: var(--panel);
}

.featured-project {
  min-height: 210px;
  background:
    linear-gradient(135deg, rgba(54, 215, 208, 0.07), transparent 44%),
    var(--panel);
}

.project-kicker {
  margin-bottom: 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.project-card h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

.project-card p {
  max-width: 780px;
  margin-bottom: 12px;
  color: var(--muted);
}

.project-card a {
  color: var(--green);
  font-weight: 700;
  text-transform: uppercase;
}

.project-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid currentColor;
  font-weight: 700;
}

.purple { color: var(--purple); }
.cyan { color: var(--cyan); }
.amber { color: var(--amber); }

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

.tags span {
  padding: 4px 8px;
  border: 1px solid rgba(74, 222, 99, 0.35);
  background: rgba(74, 222, 99, 0.08);
  color: var(--green);
  font-size: 12px;
}

.contact-card {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line-bright);
  background: var(--panel);
}

.contact-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 2px 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

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

.contact-row > span {
  grid-row: span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-bright);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.contact-row strong {
  color: var(--green);
}

.contact-row small {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  body {
    overflow: hidden;
  }

  .site-shell,
  .site-shell.wide {
    width: min(100% - 20px, 680px);
    height: calc(100dvh - 20px);
    min-height: 0;
    overflow: hidden;
    margin: 10px auto;
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .site-footer {
    gap: 8px;
  }

  .nav {
    justify-content: flex-start;
    gap: 10px 18px;
  }

  main {
    padding: 34px 22px 0;
  }

  .hero-grid,
  .page-grid,
  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .profile-list div,
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-icon {
    width: 56px;
    height: 56px;
  }
}

@media (min-width: 821px) and (max-height: 760px) {
  .site-shell {
    min-height: 0;
  }

  .site-header {
    padding-block: 12px;
  }

  main {
    padding-inline: 42px;
  }

  main {
    padding-top: 22px;
  }

  h1,
  .page-title {
    font-size: clamp(32px, 4vw, 52px);
  }

  .hero-lede,
  .copy-block {
    font-size: 14px;
  }

  .skill-tile {
    min-height: 42px;
  }
}

@media (max-width: 460px) {
  h1,
  .page-title {
    font-size: 34px;
  }

  .button,
  .actions {
    width: 100%;
  }

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