:root {
  color-scheme: dark;
  --background: #0c1017;
  --heading: #f6f7fa;
  --text: #c7cdd8;
  --muted: #aeb8c8;
  --line: #303843;
  --link: #5799ff;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 18px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--link);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1.5px;
}

a:hover {
  color: #a6caff;
}

a:focus-visible {
  outline: 3px solid var(--heading);
  outline-offset: 5px;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--heading);
}

.site-shell {
  width: calc(100% - clamp(32px, 12vw, 176px));
  max-width: 1320px;
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 16px;
  left: 16px;
  padding: 12px 18px;
  transform: translateY(-180%);
  background: var(--background);
  color: var(--heading);
  border: 1px solid var(--heading);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 36px;
  min-height: 80px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 44px;
  color: var(--heading);
  text-decoration: none;
}

.brand-word {
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -0.07em;
  line-height: 1;
}

.brand-subtitle {
  padding-left: 24px;
  border-left: 1px solid var(--muted);
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 38px;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.topnav a:hover {
  color: var(--heading);
  text-decoration: underline;
}

.intro {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  column-gap: 60px;
  padding-block: 36px 40px;
}

.intro h1 {
  font-size: clamp(48px, 6.6vw, 92px);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.subtitle {
  margin-top: 6px;
  font-size: clamp(20px, 2.3vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.intro-note {
  max-width: 33ch;
  font-size: 20px;
  line-height: 1.35;
}

.intro-note time {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.project-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 40px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}

.project-date {
  align-self: stretch;
  margin-block: 4px;
  padding: 7px 20px 0 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.project-date time {
  display: block;
}

.project-body {
  min-width: 0;
}

.project-body h2 {
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.045em;
  overflow-wrap: anywhere;
}

.project-description {
  max-width: 36ch;
  margin-top: 7px;
  font-size: 21px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 22px;
  margin-top: 6px;
  font-size: 21px;
  line-height: 1.3;
}

.project-link,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
}

.availability {
  display: inline-block;
  padding-block: 8px;
  color: var(--text);
}

.project-preview {
  min-width: 0;
  width: 100%;
  background: #131c29;
}

.project-preview a {
  display: block;
}

.project-preview img {
  width: 100%;
  height: auto;
  aspect-ratio: 3.2 / 1;
  object-fit: cover;
  object-position: center top;
}

.project-preview--basecat img {
  object-position: center;
}

.work-section {
  padding-top: 68px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.section-heading p {
  max-width: 52ch;
  color: var(--muted);
  font-size: 16px;
}

.section-count {
  margin-left: 10px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: normal;
}

.project-row--compact {
  grid-template-columns: 110px minmax(0, 1fr);
  padding-block: 24px;
}

.project-row--compact .project-body h2,
.project-row--compact .project-body h3 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.project-row--compact .project-description {
  max-width: 76ch;
  font-size: 18px;
  line-height: 1.45;
}

.project-row--compact .project-actions {
  font-size: 18px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 52px;
  padding-block: 24px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer .brand-word {
  font-size: 24px;
}

.site-footer .brand-subtitle {
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .intro {
    column-gap: 36px;
  }

  .intro-note {
    font-size: 18px;
  }

  .project-row {
    grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 24px;
  }

  .project-date {
    padding-right: 14px;
    font-size: 14px;
  }

  .project-description,
  .project-actions {
    font-size: 18px;
  }

  .project-row--compact {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-block: 36px 28px;
  }

  .intro-note {
    max-width: 54ch;
  }

  .intro-note time {
    margin-top: 8px;
  }

  .project-row {
    grid-template-columns: 88px minmax(0, 1fr);
    row-gap: 18px;
  }

  .project-date {
    grid-row: span 2;
  }

  .project-preview {
    grid-column: 2;
  }

  .project-row--compact .project-date {
    grid-row: auto;
  }

  .project-description {
    max-width: 54ch;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: calc(100% - 32px);
  }

  .topbar {
    flex-wrap: wrap;
    gap: 6px 24px;
    padding-block: 12px;
  }

  .brand {
    gap: 16px;
  }

  .brand-word {
    font-size: 30px;
  }

  .brand-subtitle {
    padding-left: 16px;
    font-size: 16px;
  }

  .topnav {
    gap: 4px 28px;
    font-size: 16px;
  }

  .intro {
    padding-block: 30px 20px;
    gap: 20px;
  }

  .intro h1 {
    font-size: clamp(42px, 10.5vw, 66px);
  }

  .subtitle {
    max-width: 28ch;
    margin-top: 9px;
    font-size: 21px;
  }

  .intro-note {
    font-size: 16px;
  }

  .project-row,
  .project-row--compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-block: 24px;
  }

  .project-date {
    grid-row: auto;
    margin: 0;
    padding: 0;
    border-right: 0;
    font-size: 13px;
  }

  .project-body h2 {
    font-size: 30px;
  }

  .project-description {
    margin-top: 6px;
    font-size: 18px;
    line-height: 1.4;
  }

  .project-actions {
    margin-top: 4px;
  }

  .project-preview {
    grid-column: 1;
  }

  .project-preview img {
    aspect-ratio: 2.4 / 1;
  }

  .work-section {
    padding-top: 40px;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 10px;
  }

  .site-footer {
    display: block;
    margin-top: 36px;
    padding-block: 20px 28px;
  }

  .site-footer > * + * {
    margin-top: 12px;
  }
}
