:root {
  --page: #ffffff;
  --ink: #090909;
  --muted: #777777;
  --line: #d8d8d8;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

html[data-theme="dark"] {
  background: #050505;
}

html.is-dark {
  background: #050505;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--page);
}

html[data-theme="dark"],
body[data-theme="dark"],
html.is-dark,
body.is-dark {
  --page: #050505;
  --ink: #ffffff;
  --muted: #9a9a9a;
  --line: #2a2a2a;
  background: var(--page);
  color: var(--ink);
}

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

button {
  font: inherit;
}

.site-header,
.site-footer {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(16px, 3.5vw, 48px);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
}

body[data-theme="dark"] .site-header {
  background: rgba(5, 5, 5, 0.9);
}

body.is-dark .site-header {
  background: rgba(5, 5, 5, 0.9);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 2.2vw, 30px);
}

.nav a,
.site-footer a {
  color: var(--muted);
}

.nav a:hover,
.site-footer a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.home,
.center-page {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 94px) clamp(16px, 3.5vw, 48px);
}

.home {
  flex: 1;
  display: flex;
  align-items: end;
}

.center-page {
  flex: 1;
  display: grid;
  align-items: end;
}

.hero,
.stack {
  width: 100%;
}

.stack {
  max-width: 980px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
p {
  margin-top: 0;
}

h1 {
  max-width: 8ch;
  margin-bottom: 22px;
  font-size: clamp(56px, 13vw, 210px);
  font-weight: 900;
  line-height: 0.78;
  text-transform: uppercase;
}

.stack h1 {
  max-width: 10ch;
  font-size: clamp(48px, 10vw, 142px);
}

.intro {
  max-width: 27ch;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 900;
  line-height: 1.18;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.button {
  min-width: 132px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--page);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.button:hover {
  background: transparent;
  color: var(--ink);
}

.button.ghost {
  background: transparent;
  color: var(--ink);
}

.button.ghost:hover {
  background: var(--ink);
  color: var(--page);
}

.theme-toggle {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: calc(78px + clamp(14px, 3vw, 32px));
  z-index: 50;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--ink);
  color: var(--page);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.theme-toggle:hover {
  background: var(--page);
  color: var(--ink);
}

.theme-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.theme-icon.sun {
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow:
    0 -8px 0 -6px currentColor,
    0 8px 0 -6px currentColor,
    8px 0 0 -6px currentColor,
    -8px 0 0 -6px currentColor,
    6px 6px 0 -6px currentColor,
    -6px -6px 0 -6px currentColor,
    6px -6px 0 -6px currentColor,
    -6px 6px 0 -6px currentColor;
}

.theme-icon.moon {
  border-radius: 50%;
  background: currentColor;
}

.theme-icon.moon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
}

.email-line {
  min-height: 30px;
  margin: 24px 0 0;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 900;
  line-height: 0.95;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.email-line a {
  border-bottom: 1px solid var(--ink);
}

.contact-alt {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-alt a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

.blog-page {
  background: var(--page);
  color: var(--ink);
}

.blog-main {
  width: min(100%, 1680px);
  margin: 0 auto;
}

.blog-hero {
  padding: clamp(36px, 6vw, 94px) clamp(16px, 3.5vw, 48px) 26px;
  border-bottom: 1px solid var(--line);
}

.blog-hero h1 {
  margin-bottom: 0;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(28px, 5vw, 92px);
  padding: clamp(24px, 4vw, 58px) clamp(16px, 3.5vw, 48px) clamp(40px, 6vw, 88px);
}

.post-reader {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.post-reader h2 {
  max-width: 8ch;
  margin: 0 0 28px;
  font-size: clamp(54px, 10vw, 150px);
  font-weight: 900;
  line-height: 0.78;
  text-transform: uppercase;
}

.post-body {
  display: grid;
  gap: 12px;
  max-width: 34ch;
}

.post-body p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 900;
  line-height: 1.18;
  text-transform: uppercase;
}

.post-list {
  display: grid;
  align-content: end;
  border-top: 1px solid var(--line);
}

.post-item {
  display: grid;
  gap: 10px;
  padding: 22px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.post-item span,
.post-item strong,
.post-item p {
  font-weight: 900;
  text-transform: uppercase;
}

.post-item span {
  font-size: 11px;
}

.post-item strong {
  color: var(--ink);
  font-size: clamp(24px, 3vw, 42px);
  line-height: 0.9;
}

.post-item p {
  max-width: 34ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.post-item[aria-pressed="true"] {
  color: var(--ink);
}

.post-item[aria-pressed="true"] strong::before {
  content: "READ / ";
}

@media (max-width: 620px) {
  .site-header,
  .site-footer {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(48px, 19vw, 92px);
  }

  .blog-layout {
    grid-template-columns: 1fr;
    padding-left: 16px;
    padding-right: 16px;
  }

  .blog-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .post-reader {
    min-height: 360px;
  }
}
