/* ==========================================================================
   Base & reset
   ========================================================================== */

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}
body {
  margin: 0;
  background: #111210;
  color: #f4f4ee;
  font:
    16px/1.55 Arial,
    Helvetica,
    sans-serif;
  --lime: #c3f873;
  --line: #32342e;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
.wrap {
  width: min(1260px, 88%);
  margin-inline: auto;
}
/* ==========================================================================
   Header, navigation & buttons
   ========================================================================== */

header {
  background: #111210;
  border-bottom: 1px solid var(--line);
}
.nav,
nav,
.actions,
.techrow,
.sectionhead,
footer,
.eyebrow {
  display: flex;
  align-items: center;
}
.nav {
  height: 77px;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: baseline;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -2.2px;
  line-height: 1;
}
.brand b {
  font-family:
    Arial Black,
    Arial,
    sans-serif;
  font-style: italic;
  transform: scaleX(1.04);
}
.brand i,
h1 span,
h2 span {
  color: var(--lime);
}
nav {
  gap: 34px;
}
nav a,
.contactbtn,
.actions a,
button.solid {
  font-size: 14px;
  font-weight: 600;
}
nav a {
  color: #aaa;
}
.active,
nav a:hover {
  color: var(--lime);
}
.contactbtn,
.outline {
  border: 1px solid #5b5e53;
  border-radius: 6px;
}
.contactbtn {
  padding: 9px 16px;
}
.contactbtn span {
  color: var(--lime);
  margin-left: 6px;
}
/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  overflow: hidden;
  background: radial-gradient(ellipse at 74% 53%, #1b2017 0%, #121410 33%, #111210 66%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 536px;
  padding-block: 52px;
}
.eyebrow,
.mono,
.techlabel,
.artnote,
.category {
  font:
    12px/1.5 "Courier New",
    monospace;
  letter-spacing: 1.7px;
}
.eyebrow {
  color: var(--lime);
  gap: 12px;
}
.rule {
  width: 30px;
  height: 2px;
  background: var(--lime);
}
h1 {
  font-size: clamp(72px, 7.1vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.07em;
  margin: 24px 0 16px;
}
h2 {
  font-size: clamp(38px, 4vw, 62px);
  letter-spacing: -0.06em;
  line-height: 1.07;
  margin: 14px 0 22px;
}
.role {
  font: clamp(17px, 1.55vw, 23px)/1.4 monospace;
  color: #d1d5ca;
  margin: 0;
}
.desc,
.about p,
.contact p,
dialog p {
  color: #b1b4aa;
}
.desc {
  max-width: 465px;
  margin: 16px 0 24px;
}
.actions {
  gap: 12px;
}
.solid,
.outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 5px;
}
.solid {
  background: var(--lime);
  border: 1px solid var(--lime);
  color: #17200e;
  font-weight: 700;
}
.solid:hover {
  background: #ddffa5;
}
.outline:hover,
.contactbtn:hover {
  border-color: var(--lime);
}
.actions .solid span {
  font-size: 18px;
  line-height: 1;
}
.art {
  position: absolute;
  right: 0;
  top: 5%;
  height: 90%;
  width: 50%;
  isolation: isolate;
}
.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#96a78416 1px, transparent 1px),
    linear-gradient(90deg, #96a78416 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse, #000 32%, transparent 73%);
}
canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.cross,
.artnote {
  position: absolute;
  color: #7b886e;
}
.cross {
  font: 20px monospace;
}
.tl {
  left: 6%;
  top: 13%;
}
.br {
  right: 2%;
  bottom: 15%;
}
.artnote {
  right: 9%;
  bottom: 4%;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.artnote i {
  width: 32px;
  height: 1px;
  background: #78826e;
}
/* ==========================================================================
   Tech stack bar
   ========================================================================== */

.tech {
  border-block: 1px solid var(--line);
  background: #161714;
}
.techrow {
  min-height: 72px;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.techrow b {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c5c7bf;
  font-size: 17px;
  letter-spacing: -0.4px;
}
.techrow em {
  font: 24px/1 Arial;
  color: #c7c9bf;
}
.techlabel,
.mono {
  color: #9a9f93;
}
.techlabel {
  border-right: 1px solid var(--line);
  padding-right: 4%;
}
/* ==========================================================================
   Project cards & previews
   ========================================================================== */

.projects {
  padding: 63px 0;
}
.sectionhead {
  justify-content: space-between;
}
.sectionhead h2 {
  margin: 8px 0 26px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  border: 1px solid #343730;
  border-radius: 10px;
  background: #181a17;
  overflow: hidden;
  color: inherit;
  text-align: left;
  padding: 0;
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-4px);
}
.thumb {
  height: 208px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.olive {
  background: radial-gradient(at 65% 30%, #b5c88b, #65794e);
}
.violet {
  background: radial-gradient(at 65% 30%, #b5a9c8, #756980);
}
.blue {
  background: radial-gradient(at 65% 30%, #9bbcc7, #546c7d);
}
.mock {
  width: 82%;
  height: 78%;
  background: #fcfcf9;
  border: 4px solid #2c302a;
  border-radius: 7px;
  box-shadow: 5px 12px 22px #18260d61;
  transform: perspective(500px) rotateY(-13deg) rotateX(9deg) rotateZ(-5deg);
  padding: 8px;
  color: #353c32;
  font-size: 8px;
  overflow: hidden;
}
.mock header {
  background: #fff;
  color: #272e24;
  border-color: #ddd;
  font-size: 9px;
  padding-bottom: 4px;
}
.dash {
  display: grid;
  grid-template-columns: 23% 1fr;
  gap: 9px;
  height: 100%;
  padding-top: 5px;
}
.side {
  color: #768169;
  font-size: 6px;
  line-height: 2.4;
  border-right: 1px solid #ddd;
}
.metrics {
  display: flex;
  gap: 4px;
  margin: 6px 0;
}
.metrics i {
  flex: 1;
  padding: 4px;
  background: #eaeee4;
  border-radius: 3px;
  font: 7px Arial;
}
.bars {
  height: 43px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  border-bottom: 1px solid #aaa;
}
.bars i {
  flex: 1;
  background: #9bb674;
  border-radius: 2px 2px 0 0;
}
.phones {
  display: flex;
  align-items: center;
  gap: 12px;
  transform: rotate(-8deg);
}
.phone {
  width: 90px;
  height: 165px;
  border: 4px solid #2d2733;
  border-radius: 14px;
  background: #f9f7fa;
  padding: 10px 5px;
  color: #42364b;
  font-size: 8px;
  box-shadow: 5px 8px 12px #30243555;
}
.phone:nth-child(2) {
  transform: translateY(15px);
}
.phone b {
  display: block;
  margin: 7px 0;
}
.person {
  padding: 5px 1px;
  border-bottom: 1px solid #ddd;
  font-size: 6px;
}
.person:before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c5b6d0;
  vertical-align: middle;
  margin-right: 5px;
}
.shop {
  background: #eff3f4;
}
.shop strong {
  display: block;
  padding: 8px;
  background: #243944;
  color: #fff;
  font: italic 15px Georgia;
}
.tiles {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.tiles i {
  flex: 1;
  height: 46px;
  background: linear-gradient(135deg, #d8e4df, #7a8e87);
  display: grid;
  place-items: center;
  font-size: 25px;
  color: white;
}
.cardcopy {
  padding: 19px 20px 22px;
}
.category {
  font-size: 11px;
  color: #b4c4a0;
}
.card h3 {
  font-size: 23px;
  letter-spacing: -1px;
  margin: 6px 0;
}
.card p {
  font-size: 14px;
  color: #b2b6ac;
  margin: 0;
}
/* ==========================================================================
   About, contact, footer
   ========================================================================== */

.about {
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 55px 0;
}
.about p:first-child {
  margin-top: 0;
}
.contact {
  padding: 65px 0;
}
.contact .solid {
  margin-top: 7px;
}
footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  justify-content: space-between;
}
footer span {
  font-size: 13px;
  color: #aaa;
}
/* ==========================================================================
   Dialog & form fields
   ========================================================================== */

dialog {
  border: 1px solid #454a3f;
  border-radius: 12px;
  padding: 35px;
  color: inherit;
  background: #1a1d18;
  width: min(510px, 92vw);
}
dialog::backdrop {
  background: #080a08d9;
}
dialog h2 {
  font-size: 37px;
  padding-right: 18px;
}
dialog p,
dialog li {
  font-size: 16px;
}
.close {
  float: right;
  border: 0;
  background: transparent;
  color: white;
  font-size: 28px;
}
.close:hover {
  color: var(--lime);
}
label {
  display: block;
  margin-bottom: 14px;
}
input,
textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  background: #111310;
  color: white;
  border: 1px solid #555b4e;
  border-radius: 5px;
  padding: 10px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
@media (max-width: 850px) {
  .techrow {
    padding: 15px 0;
    justify-content: center;
    gap: 13px 24px;
  }
  .techlabel {
    display: none;
  }
  .thumb {
    height: 165px;
  }
  .cards {
    gap: 12px;
  }
  .cardcopy {
    padding: 12px;
  }
  .card h3 {
    font-size: 20px;
  }
  .hero-inner {
    min-height: 485px;
  }
  .art {
    right: -4%;
    width: 52%;
  }
}
@media (max-width: 650px) {
  .wrap {
    width: 89%;
  }
  .nav {
    height: 62px;
  }
  .brand {
    font-size: 25px;
  }
  nav {
    gap: 12px;
  }
  nav a {
    font-size: 12px;
  }
  nav a:first-child {
    display: none;
  }
  .contactbtn {
    font-size: 12px;
    padding: 7px 10px;
  }
  .hero-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 36px 0 10px;
  }
  .art {
    position: relative;
    right: 0;
    width: 100%;
    height: 270px;
  }
  .artnote {
    bottom: 3%;
  }
  h1 {
    font-size: 74px;
  }
  .desc {
    font-size: 15px;
  }
  .techrow b {
    font-size: 14px;
  }
  .techrow em {
    font-size: 18px;
  }
  .projects {
    padding: 40px 0;
  }
  .cards,
  .about {
    grid-template-columns: 1fr;
  }
  .thumb {
    height: 208px;
  }
  .cardcopy {
    padding: 16px;
  }
  .about {
    gap: 5px;
    padding: 35px 0;
  }
  .mono {
    font-size: 10px;
  }
  .contact {
    padding: 42px 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .card {
    transition: none;
  }
}
/* ==========================================================================
   Language switch & responsive tweaks
   ========================================================================== */

.nav-tools,
.languages {
  display: flex;
  align-items: center;
}
.nav-tools {
  gap: 16px;
}
.languages {
  border: 1px solid #44483e;
  border-radius: 6px;
  padding: 2px;
}
.languages a {
  padding: 5px 8px;
  font: 600 13px/1.5 monospace;
  border-radius: 3px;
  color: #b9bdb3;
}
.languages a[aria-current="true"] {
  color: var(--lime);
  background: #293020;
}
.languages a:hover {
  color: white;
}
@media (max-width: 650px) {
  .nav-tools {
    gap: 8px;
  }
  .languages a {
    padding: 4px 5px;
  }
  .nav {
    gap: 8px;
  }
}
@media (max-width: 400px) {
  .nav {
    height: auto;
    min-height: 65px;
    flex-wrap: wrap;
    padding-block: 8px;
  }
  .nav nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .nav nav a:first-child {
    display: inline;
  }
}

/* ==========================================================================
   Theme switch & light theme
   ========================================================================== */

html {
  color-scheme: dark;
}
.theme-switch {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid #515648;
  border-radius: 6px;
  color: inherit;
  background: transparent;
}
.theme-switch:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.theme-switch .sun {
  display: none;
}
html[data-theme="light"] {
  color-scheme: light;
}
[data-theme="light"] body {
  --lime: #38630c;
  --line: #ced6c7;
  color: #192119;
  background: #f7f9f4;
}
[data-theme="light"] body > header {
  background: #f7f9f4;
}
[data-theme="light"] .hero {
  background: radial-gradient(ellipse at 74% 53%, #e1edcf 0%, #f0f5e9 36%, #f7f9f4 67%);
}
[data-theme="light"] .tech {
  background: #edf2e7;
}
[data-theme="light"] :is(.techrow b, .techrow em, .role) {
  color: #374534;
}
[data-theme="light"]
  :is(
    .desc,
    .about p,
    .contact p,
    dialog p,
    .card p,
    .mono,
    .techlabel,
    footer span,
    nav a,
    .artnote,
    .cross
  ) {
  color: #54604e;
}
[data-theme="light"] :is(nav a.active, nav a:hover, .category, .languages a:hover) {
  color: var(--lime);
}
[data-theme="light"] :is(.theme-switch, .outline, .contactbtn, .languages) {
  border-color: #85937b;
}
[data-theme="light"] .theme-switch .sun {
  display: block;
}
[data-theme="light"] .theme-switch .moon {
  display: none;
}
[data-theme="light"] .languages a {
  color: #45523e;
}
[data-theme="light"] .languages a[aria-current="true"] {
  color: #325b0b;
  background: #e0edcf;
}
[data-theme="light"] :is(dialog, .card) {
  background: #fff;
  border-color: #c8d1c1;
}
[data-theme="light"] :is(input, textarea) {
  color: #192119;
  background: #f7f9f4;
  border-color: #819076;
}
[data-theme="light"] .close {
  color: #374534;
}
[data-theme="light"] .solid {
  color: #17200e;
  background: #bfec82;
  border-color: #8ba968;
}
[data-theme="light"] .solid:hover {
  background: #addd6d;
}
@media (max-width: 520px) {
  .nav {
    height: auto;
    min-height: 65px;
    flex-wrap: wrap;
    padding-block: 8px;
  }
  .nav nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .nav nav a:first-child {
    display: inline;
  }
  .theme-switch {
    width: 33px;
    height: 33px;
  }
}
/* ==========================================================================
   Projects catalog page & project links
   ========================================================================== */

.catalog {
  padding-block: clamp(48px, 8vw, 110px);
  min-height: 65vh;
}
.catalog h1 {
  font-size: clamp(46px, 6vw, 82px);
  margin: 0;
}
.catalog .sectionhead {
  margin-bottom: 38px;
  gap: 18px;
}
.all-projects,
.page-control {
  font-size: 14px;
  font-weight: 600;
}
#pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.page-control {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: inherit;
}
.page-control[aria-disabled] {
  opacity: 0.55;
}
#page-state {
  font-size: 14px;
}
@media (max-width: 650px) {
  .projects .sectionhead {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
  }
  .projects .sectionhead h2 {
    margin-bottom: 0;
  }
  .all-projects {
    padding: 8px 12px;
  }
  #pagination {
    gap: 8px;
  }
}
#pagination .page-control {
  display: inline-flex;
}
.project-card {
  display: flex;
  flex-direction: column;
}
.project-details {
  display: block;
  width: 100%;
  flex: 1;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
  text-align: left;
}
.project-details:focus-visible {
  outline-offset: -3px;
}
.project-link {
  align-self: flex-start;
  margin: 0 20px 20px;
  font-size: 14px;
  font-weight: 600;
}
.project-link:disabled {
  margin-bottom: 5px;
  color: inherit;
  opacity: 0.62;
  background: transparent;
  border-color: currentColor;
  cursor: not-allowed;
}
.project-link-note {
  margin: 0 20px 20px;
  color: inherit;
  font-size: 13px;
}
