@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-ExtraLight.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexSans-Light.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-Text.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/IBMPlexMono-Bold.woff2") format("woff2");
}

:root {
  --bg: #FFF6F6;
  --fg: #151515;
  --muted: #5f5f5f;
  --muted-soft: #7a7a7a;
  --accent: #CA2315;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Mono", monospace;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

a:hover {
  color: var(--accent);
}

.page {
  width: min(50.5rem, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 0 0 4.5rem;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding-top: 5rem;
}

.hero-text {
  flex: 1 1 auto;
  padding-top: 1.9rem;
}

.hero h1 {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: clamp(2rem, 4.2vw, 2.95rem);
  font-weight: 200;
  line-height: 1.08;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.name-accent {
  color: var(--accent);
}

.hero-card {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(8.5rem, 12vw, 10.5rem);
}

.hero-kirby {
  display: block;
  width: 100%;
  height: auto;
}

.copy {
  display: grid;
  gap: 1.3rem;
}

.copy p {
  max-width: 46rem;
  margin: 0;
  color: var(--fg);
  font-size: clamp(0.96rem, 1.55vw, 1.08rem);
  line-height: 1.85;
  font-weight: 400;
}

.copy-strong {
  color: var(--fg) !important;
}

.footer-line {
  margin-top: 0.7rem !important;
  color: var(--muted-soft) !important;
}

.writing-page {
  padding-top: 5.6rem;
}

.top-link {
  margin-bottom: 3.2rem;
  font-size: 0.96rem;
  line-height: 1.6;
}

.writing-header {
  margin-bottom: 3.4rem;
}

.writing-header h1 {
  margin: 0 0 1.4rem;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: clamp(2.2rem, 4.2vw, 3rem);
  font-weight: 200;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.writing-header p {
  max-width: 44rem;
  margin: 0;
  color: var(--fg);
  font-size: clamp(0.96rem, 1.55vw, 1.08rem);
  line-height: 1.85;
}

.writing-list {
  display: grid;
  gap: 0.15rem;
  margin-top: 2.8rem;
}

.writing-list h2 {
  margin: 0 0 1rem;
  color: var(--muted-soft);
  font-size: 0.96rem;
  font-weight: 400;
  line-height: 1.6;
}

.writing-empty {
  max-width: 44rem;
  margin: 0;
  color: var(--muted-soft);
  font-size: clamp(0.96rem, 1.55vw, 1.08rem);
  line-height: 1.85;
}

.writing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 0.38rem 0;
  color: var(--fg);
  text-decoration: none;
}

.writing-row:hover .writing-title {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.writing-title {
  min-width: 0;
  font-size: clamp(0.96rem, 1.55vw, 1.08rem);
  line-height: 1.7;
}

.writing-meta {
  color: var(--muted-soft);
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .page {
    width: calc(100vw - 1.5rem);
    padding-top: 0;
  }

  .hero {
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    padding-top: 4.4rem;
  }

  .hero-text {
    padding-top: 0;
  }

  .hero-card {
    width: clamp(6.5rem, 24vw, 8.25rem);
  }

  .hero h1 {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 4rem;
  }

  .hero-card {
    right: 0.2rem;
    width: clamp(5.75rem, 23vw, 7rem);
  }

  .copy {
    gap: 1.15rem;
  }

  .copy p {
    font-size: 0.94rem;
    line-height: 1.75;
  }

  .writing-page {
    padding-top: 4rem;
  }

  .top-link {
    margin-bottom: 2.4rem;
  }

  .writing-header {
    margin-bottom: 2.6rem;
  }

  .writing-row {
    grid-template-columns: 1fr;
    gap: 0.05rem;
    padding: 0.5rem 0;
  }

  .writing-meta {
    white-space: normal;
  }
}
