:root {
  color-scheme: dark;
  --bg: #000;
  --text: #f4f4f4;
  --muted: #adadad;
  --dim: #717171;
  --line: #e8e8e8;
  --panel: #030303;
  --max: 1120px;
  font-family: "Lilex", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@font-face {
  font-family: "Lilex";
  src: url("/assets/preview/fonts/lilex-variable.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

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

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

.site-header {
  display: flex;
  width: min(calc(100% - 136px), var(--max));
  margin: 0 auto;
  padding: 66px 0 58px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.site-title {
  color: var(--text);
  font-size: clamp(2.2rem, 4vw, 2.95rem);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.site-header nav a {
  color: var(--text);
  font-size: clamp(1.1rem, 1.8vw, 1.42rem);
  line-height: 1;
}

.page-shell {
  width: min(calc(100% - 136px), var(--max));
  margin: 0 auto;
}

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

.project-card {
  display: block;
  overflow: hidden;
  min-height: 438px;
  border: 2px solid var(--line);
  border-radius: 27px;
  background: var(--panel);
}

.project-card:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 6px;
}

.project-card img {
  width: 100%;
  height: clamp(168px, 16.8vw, 218px);
  object-fit: cover;
  border-bottom: 1px solid #111;
}

.project-card-body {
  display: block;
  padding: 62px 12% 58px;
}

.project-title,
.project-summary {
  display: block;
}

.project-title {
  font-size: clamp(1.45rem, 2.2vw, 1.78rem);
  font-weight: 700;
  line-height: 1.15;
}

.project-summary {
  max-width: 760px;
  margin-top: 14px;
  color: #d7d7d7;
  font-size: clamp(0.94rem, 1.35vw, 1.16rem);
  line-height: 1.45;
}

.about-section {
  max-width: 760px;
  margin: 76px auto 0;
  padding: 0 0 26px;
}

.about-section h1,
.about-section h2 {
  margin: 0 0 22px;
  color: var(--text);
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  line-height: 1.2;
}

.about-section p {
  margin: 0;
  color: #d0d0d0;
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  font-weight: 600;
  line-height: 1.7;
}

.about-section p + p {
  margin-top: 24px;
}

.narrow-page {
  min-height: 58vh;
}

.about-page {
  margin-top: 0;
}

.site-footer {
  display: flex;
  width: min(calc(100% - 136px), var(--max));
  margin: 70px auto 0;
  padding: 0 0 46px;
  align-items: center;
  justify-content: space-between;
  color: var(--dim);
  font-size: clamp(1rem, 1.7vw, 1.32rem);
}

.site-footer a:focus-visible,
.site-header a:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 5px;
}

.project-article {
  padding-bottom: 36px;
}

.project-hero {
  width: 100%;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid #111;
}

.project-hero img {
  width: 100%;
  height: clamp(250px, 32vw, 462px);
  object-fit: cover;
}

.article-head {
  width: min(calc(100% - 136px), 840px);
  margin: 0 auto;
  padding: 58px 0 56px;
}

.article-meta {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.3vw, 1.1rem);
  line-height: 1.5;
}

.article-head h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.55rem, 2.35vw, 1.9rem);
  line-height: 1.25;
}

.article-head p:last-child {
  max-width: 620px;
  margin: 14px 0 0;
  color: #d5d5d5;
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  line-height: 1.55;
}

.article-rule {
  border-top: 1px solid var(--line);
}

.article-body {
  width: min(calc(100% - 136px), 840px);
  margin: 0 auto;
  padding: 62px 0 0;
}

.article-body h2,
.article-body h3 {
  max-width: 760px;
  margin: 0 auto 26px;
  color: var(--text);
  font-size: clamp(0.96rem, 1.25vw, 1.05rem);
  line-height: 1.5;
}

.article-body p,
.article-body ul {
  max-width: 760px;
  margin: 0 auto 44px;
  color: #d0d0d0;
  font-size: clamp(0.94rem, 1.18vw, 1.06rem);
  font-weight: 600;
  line-height: 1.73;
}

.article-body ul {
  padding-left: 1.25em;
}

.article-body li + li {
  margin-top: 14px;
}

.article-body code {
  color: var(--text);
}

.article-figure {
  width: min(100%, 640px);
  margin: 66px auto 76px;
}

.article-figure img {
  width: 100%;
  border-radius: 27px;
}

.article-figure figcaption {
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  font-weight: 600;
}

@media (max-width: 820px) {
  .site-header,
  .page-shell,
  .site-footer,
  .article-head,
  .article-body {
    width: min(calc(100% - 36px), var(--max));
  }

  .site-header {
    padding: 34px 0 34px;
  }

  .project-list {
    gap: 30px;
  }

  .project-card {
    min-height: 0;
    border-radius: 19px;
  }

  .project-card img {
    height: clamp(132px, 38vw, 190px);
  }

  .project-card-body {
    padding: 32px 28px 42px;
  }

  .about-section {
    margin-top: 52px;
  }

  .site-footer {
    margin-top: 54px;
    padding-bottom: 32px;
  }

  .project-hero img {
    height: clamp(190px, 50vw, 320px);
  }

  .article-head {
    padding: 38px 0 40px;
  }

  .article-body {
    padding-top: 44px;
  }

  .article-body h2,
  .article-body h3,
  .article-body p,
  .article-body ul {
    max-width: none;
  }

  .article-body p,
  .article-body ul {
    margin-bottom: 42px;
  }

  .article-figure {
    margin: 58px auto 64px;
  }

  .article-figure img {
    border-radius: 19px;
  }
}

@media (max-width: 480px) {
  .site-header {
    align-items: center;
    gap: 14px;
  }

  .site-title {
    font-size: clamp(1.55rem, 7vw, 1.72rem);
  }

  .site-header nav a {
    font-size: 1rem;
  }

  .project-title {
    font-size: 1.42rem;
  }

  .project-summary {
    font-size: 1rem;
  }

  .site-footer {
    font-size: 1rem;
  }
}
