:root {
  --ink: #171717;
  --muted: #777;
  --paper: #f8f8f6;
  --line: #dddcd7;
  --accent: #d7ff58;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.site-header,
main,
footer {
  width: min(1080px, calc(100% - 56px));
  margin: auto;
}
.site-header {
  height: 82px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.06em;
}
.logo span {
  color: #89aa23;
}
.site-header nav {
  display: flex;
  gap: 25px;
  font:
    10px "Courier New",
    monospace;
  text-transform: uppercase;
  color: #555;
}
.site-header nav a {
  position: relative;
}
.site-header nav a[aria-current="page"] {
  color: var(--ink);
}
.site-header nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--ink);
}
.site-header nav a:hover,
.header-mail:hover,
footer a:hover {
  color: #777;
}
.header-mail {
  font:
    10px "Courier New",
    monospace;
  text-transform: uppercase;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 8px 10px;
  font:
    10px "Courier New",
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.intro {
  padding: 135px 0 150px;
  max-width: 750px;
}
.kicker,
.section-label span,
.tag {
  font:
    10px "Courier New",
    monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #777;
}
.intro h1 {
  font-size: clamp(52px, 8vw, 98px);
  line-height: 0.98;
  letter-spacing: -0.09em;
  margin: 23px 0 30px;
  font-weight: 600;
}
.intro h1 span {
  font-style: italic;
  font-family: Georgia, serif;
  font-weight: 400;
}
.intro-copy {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  max-width: 340px;
  margin-bottom: 31px;
}
.button {
  background: var(--ink);
  color: #fff;
  display: inline-block;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 600;
}
.button:hover {
  background: #444;
}
.section {
  border-top: 1px solid var(--line);
  padding: 35px 0 115px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 30px;
}
.section-label {
  display: flex;
  gap: 16px;
  align-items: baseline;
}
.section-label h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  font-weight: 600;
}
.project-list {
  border-top: 1px solid var(--line);
}
.project {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 40px;
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.project-number {
  font:
    11px "Courier New",
    monospace;
  color: #888;
}
.project-info h3 {
  font-size: 20px;
  letter-spacing: -0.04em;
  margin: 0 0 8px;
  font-weight: 600;
}
.project-info h3 span {
  font-size: 15px;
  font-weight: 400;
}
.project-info p {
  color: #666;
  font-size: 13px;
  line-height: 1.55;
  max-width: 390px;
  margin: 0 0 13px;
}
.tag {
  font-size: 9px;
}
.project-arrow {
  font-size: 20px;
  text-align: right;
}
.project:not(.project-featured):hover {
  background: #f0f0ec;
}
.project-featured {
  grid-template-columns: 52px 1fr 270px;
  gap: 20px;
}
.calculator {
  background: #202020;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  width: 250px;
  justify-self: end;
}
.tic-tac-toe {
  background: #202020;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  width: 250px;
  justify-self: end;
}
.game-status {
  margin: 0 0 12px;
  color: #d7ff58;
  font:
    11px "Courier New",
    monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.game-cell {
  border: 0;
  background: #343434;
  color: #fff;
  border-radius: 5px;
  height: 65px;
  font:
    28px Arial,
    sans-serif;
  font-weight: 600;
  cursor: pointer;
}
.game-cell:hover,
.game-cell:focus-visible {
  background: #505050;
}
.game-cell:focus-visible,
.game-reset:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.game-cell[data-player="X"] {
  color: var(--accent);
}
.game-cell[data-player="O"] {
  color: #fff;
}
.game-cell.is-winner {
  background: #5a6f19;
}
.game-reset {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #555;
  background: transparent;
  color: #fff;
  font:
    10px "Courier New",
    monospace;
  text-transform: uppercase;
  cursor: pointer;
}
.game-reset:hover {
  background: #343434;
}
.calculator output {
  display: block;
  text-align: right;
  font:
    28px "Courier New",
    monospace;
  overflow: hidden;
  padding: 7px 4px 18px;
}
.calculator-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.key {
  border: 0;
  background: #343434;
  color: #fff;
  border-radius: 5px;
  height: 40px;
  font:
    14px "Courier New",
    monospace;
  cursor: pointer;
}
.key:hover {
  background: #505050;
}
.key-muted {
  background: #555;
  color: #ddd;
}
.key-accent {
  background: var(--accent);
  color: var(--ink);
}
.key-accent:hover {
  background: #e8ff9b;
}
.key-zero {
  grid-column: span 2;
  text-align: left;
  padding-left: 18px;
}
.about-content,
.contact-content {
  max-width: 500px;
}
.about-content p,
.contact-content p {
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}
.contact-content a {
  display: inline-block;
  margin-top: 18px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 7px;
  font-size: 14px;
}
.contact-content a span {
  margin-left: 20px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 25px 0 32px;
  display: flex;
  justify-content: space-between;
  font:
    10px "Courier New",
    monospace;
  text-transform: uppercase;
  color: #777;
}
.social-links {
  display: flex;
  gap: 4px;
}
@media (max-width: 760px) {
  .site-header,
  main,
  footer {
    width: calc(100% - 36px);
  }
  .site-header {
    height: auto;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 18px 0;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .site-header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
  .site-header.nav-open nav {
    display: flex;
  }
  .header-mail {
    display: none;
  }
  .intro {
    padding: 90px 0 100px;
  }
  .intro h1 {
    font-size: clamp(50px, 14vw, 80px);
  }
  .section {
    display: block;
    padding: 27px 0 75px;
  }
  .section-label {
    margin-bottom: 28px;
  }
  .project-featured {
    display: block;
  }
  .project-featured .project-info {
    margin-bottom: 23px;
  }
  .calculator {
    width: 100%;
    max-width: 300px;
    justify-self: auto;
  }
  .tic-tac-toe {
    width: 100%;
    max-width: 300px;
    justify-self: auto;
  }
  .project {
    grid-template-columns: 35px 1fr 20px;
    gap: 12px;
  }
  .project-info h3 {
    font-size: 17px;
  }
  .project-info p {
    font-size: 12px;
  }
  .about-content p,
  .contact-content p {
    font-size: 18px;
  }
  footer {
    font-size: 8px;
    gap: 10px;
  }
  footer span:nth-child(2) {
    display: none;
  }
}
.page-intro {
  padding-bottom: 110px;
}
.profile-links a {
  display: inline-block;
  border-bottom: 1px solid var(--ink);
  padding: 4px 0;
  margin-top: 8px;
}
.contact-form {
  max-width: 510px;
  display: grid;
  gap: 9px;
}
.contact-form label {
  font:
    10px "Courier New",
    monospace;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}
.contact-form input,
.contact-form textarea {
  font:
    15px Arial,
    sans-serif;
  border: 1px solid var(--line);
  background: #fff;
  padding: 13px;
  border-radius: 0;
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.contact-form button {
  border: 0;
  cursor: pointer;
  margin-top: 15px;
  justify-self: start;
}
.form-note {
  font-size: 12px;
  color: var(--muted);
  min-height: 1.5em;
}
