@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-ExtraLightItalic.woff2") format("woff2");
  font-weight: 200;
  font-style: italic;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
}

.post {
  min-width: 0;
  overflow-wrap: anywhere;
}

.post img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-inline: auto;
}

pre {
  overflow-x: auto;
}

.post img.cover {
  width: 56%;
}

@media (max-width: 600px) {
  .post img.cover {
    width: 100%;
  }
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-MediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-SemiBoldItalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
}

@font-face {
  font-family: "Spectral";
  src: url("fonts/Spectral-ExtraBoldItalic.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
}

/* ---------------------------------------------------------------------------
   Baseline / reset
   --------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color: #363737;
  font-family: "Spectral", Georgia, serif;
  font-size: 19px;
  line-height: 1.6;
  font-weight: 400;
  font-kerning: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  background-color: #fff;
  overflow-wrap: break-word;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

:root {
  --code-bg: #f5f5f5;
  --code-border: #e4e4e4;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

pre,
table {
  max-width: 100%;
  overflow-x: auto;
}

pre {
  margin: 1.2em 0;
  padding: 14px 18px;
  border: 1px solid var(--code-border);
  border-radius: 8px;
  background: var(--code-bg);
  line-height: 1.5;
  font-family: var(--mono);
  font-size: 0.82em;
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  white-space: pre-wrap;
}

pre code {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: inherit;
  white-space: pre;
}

code a {
  text-decoration: none;
}

hr {
  border: 0;
  border-top: 1px solid #e6e6e6;
  margin: 24px 0;
}

/* ---------------------------------------------------------------------------
   Typography
   --------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5 {
  color: #363737;
  font-family: "SF Pro Display", -apple-system-headline, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 1.4em 0 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }

b,
strong {
  color: #363737;
}

a {
  color: #363737;
}

.meta,
.post-date,
.post-card-date {
  color: #757575;
  font-family: "SF Pro Display", -apple-system-headline, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid #e6e6e6;
  background-color: #fff;
}

.site-title {
  font-size: 1.5rem;
  line-height: 1.4;
  margin: 0;
  padding: 18px 16px;
  text-align: center;
}

.site-title a {
  text-decoration: none;
}

main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

main > * {
  min-width: 0;
}

main > h1:first-child {
  margin-top: 0;
}

.post img {
  margin-inline: auto;
}

.post p:has(> img:only-child) {
  margin-block: 0;
}

.post p:has(> img:only-child) img {
  margin-block: 8px;
}

.post img.cover {
  width: 56%;
}

footer {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer {
  margin-top: auto;
  border-top: 1px solid #e6e6e6;
  background: #fff;
}

.footer-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 20px 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.footer-inner > :last-child {
  margin-left: auto;
}

.footer-tagline {
  margin: 0 0 8px;
  color: #363737;
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #363737;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-desc {
  color: #757575;
  font-size: 0.9rem;
  line-height: 1.2;
}

.footer-link:hover {
  color: #757575;
  text-decoration: underline;
}

.footer-icon {
  flex-shrink: 0;
  color: #757575;
}

@media (max-width: 600px) {
  .footer-inner {
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  .footer-inner > :last-child {
    margin-left: 0;
    width: 100%;
  }
}

/* ---------------------------------------------------------------------------
   Post list (homepage)
   --------------------------------------------------------------------------- */

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-card {
  border-bottom: 1px solid #e6e6e6;
}

.post-card:last-child {
  border-bottom: 0;
}

.post-card-link {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 0;
  text-decoration: none;
  color: inherit;
}

.post-card-body {
  flex: 1;
  min-width: 0;
}

.post-card-title {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.post-card-link:hover .post-card-title {
  text-decoration: underline;
}

.post-card-desc {
  margin: 10px 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
}

.post-card-thumb {
  flex: 0 0 160px;
  width: 160px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #f0f0f0;
}

/* ---------------------------------------------------------------------------
   Content blocks
   --------------------------------------------------------------------------- */

.block {
  border: 1px dotted #363737;
  padding: 5px 15px;
  margin: 0 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.block h1 {
  font-size: 1em;
  text-align: center;
  margin-bottom: 0;
}

.small {
  font-size: 0.8em;
}

.wave {
  background: #f0f0f0;
  color: #363737;
}

.block.tip {
  background-color: #f0f0f0;
  border: none;
  border-radius: 8px;
  padding: 16px 24px;
  margin: 32px 0;
  text-align: left;
  display: block;
}

.block.tip > p {
  margin: 8px 0;
}

.block.tip h1,
.block.tip h2,
.block.tip h3,
.block.tip h4,
.block.tip h5 {
  text-align: left;
}

.block.highlight-quote {
  background-color: transparent;
  border: none;
  border-left: 4px solid #FF5CD7;
  border-radius: 0;
  padding: 0;
  margin: 20px 0;
  text-align: left;
  display: block;
}

.block.highlight-quote > * {
  margin-left: 20px;
}

.block.highlight-quote h1,
.block.highlight-quote h2,
.block.highlight-quote h3,
.block.highlight-quote h4,
.block.highlight-quote h5 {
  text-align: left;
}

/* ---------------------------------------------------------------------------
   Mobile
   --------------------------------------------------------------------------- */

@media (max-width: 600px) {
  html {
    font-size: 17px;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }

  .site-title {
    font-size: 1.25rem;
    padding: 14px 16px;
  }

  main {
    padding: 24px 16px 16px;
  }

  .post img.cover {
    width: 100%;
  }

  .post-card-link {
    gap: 16px;
    padding: 20px 0;
  }

  .post-card-thumb {
    flex-basis: 96px;
    width: 96px;
    aspect-ratio: 1 / 1;
  }

  .post-card-title {
    font-size: 1.15rem;
  }

  .block.tip {
    padding: 12px 16px;
  }

  .block.highlight-quote > * {
    margin-left: 12px;
  }
}
