:root {
  --color-text: #4a3b52;
  --color-heading: #3c2a46;
  --color-accent: #ff6f59;
  --color-accent-dark: #dd4f3c;
  --color-muted: #8a7690;
  --color-border: #f0dce6;
  --color-code-bg: #f6ecf9;
  --color-page-bg: #fdf6f2;
  --color-card-bg: #fffdfb;

  --color-cloud-body: #fffaf3;
  --color-cloud-face: #5b3f57;
  --color-cloud-cheek: #ff9e85;

  --sky-gradient: linear-gradient(160deg, #bfe3fb 0%, #eaf6ff 45%, #ffe29a 100%);

  --font-display: "Baloo 2", "Comic Sans MS", ui-rounded, sans-serif;
  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-page-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
}

.wrapper {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

a {
  color: var(--color-accent);
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: color-mix(in srgb, var(--color-accent) 55%, transparent);
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--color-accent-dark);
  text-decoration-style: solid;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 700;
}

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

/* ---------- Sky banner header ---------- */

.site-header {
  margin-bottom: 2.5rem;
}

.sky-banner {
  position: relative;
  overflow: hidden;
  background: var(--sky-gradient);
  padding: 2.75rem 1.25rem 0;
}

.banner-inner {
  position: relative;
  z-index: 2;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 2.25rem;
}

.mascot-link {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.mascot {
  filter: drop-shadow(0 6px 10px rgba(60, 42, 70, 0.18));
}

@keyframes mascot-shake {
  0%, 14%, 100% { transform: rotate(0deg); }
  4% { transform: rotate(-14deg); }
  9% { transform: rotate(10deg); }
}

.mascot-fist {
  transform-box: fill-box;
  transform-origin: 78% 55%;
  animation: mascot-shake 4.5s ease-in-out infinite;
}

.site-title {
  margin: 0.25rem 0 0;
  font-size: 2.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
}

.site-title a {
  color: var(--color-heading);
  text-decoration: none;
}

.site-tagline {
  margin: 0.35rem 0 0;
  color: var(--color-heading);
  opacity: 0.75;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
}

.cloud-divider {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 34px;
}

.cloud-divider path {
  fill: var(--color-page-bg);
}

.cloud-decor {
  position: absolute;
  z-index: 1;
  background: #fff;
  opacity: 0.55;
  border-radius: 100px;
  filter: blur(0.5px);
}

.cloud-decor::before,
.cloud-decor::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-decor-1 {
  width: 110px;
  height: 40px;
  top: 18%;
  left: -140px;
  animation: drift-right 38s linear infinite;
}
.cloud-decor-1::before { width: 55%; height: 130%; top: -60%; left: 8%; }
.cloud-decor-1::after { width: 40%; height: 100%; top: -45%; right: 12%; }

.cloud-decor-2 {
  width: 70px;
  height: 28px;
  top: 55%;
  left: -100px;
  opacity: 0.4;
  animation: drift-right 52s linear infinite;
  animation-delay: -18s;
}
.cloud-decor-2::before { width: 55%; height: 130%; top: -60%; left: 8%; }
.cloud-decor-2::after { width: 40%; height: 100%; top: -45%; right: 12%; }

.cloud-decor-3 {
  width: 150px;
  height: 50px;
  top: 8%;
  left: -190px;
  opacity: 0.35;
  animation: drift-right 65s linear infinite;
  animation-delay: -30s;
}
.cloud-decor-3::before { width: 55%; height: 130%; top: -60%; left: 8%; }
.cloud-decor-3::after { width: 40%; height: 100%; top: -45%; right: 12%; }

@keyframes drift-right {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 220px)); }
}

@media (prefers-reduced-motion: reduce) {
  .cloud-decor,
  .mascot-fist {
    animation: none;
  }
}

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

article h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.post-date {
  color: var(--color-muted);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: 2rem;
}

blockquote {
  position: relative;
  margin: 1.75rem 0 1.75rem 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--color-code-bg);
  border-radius: 18px 18px 18px 4px;
  color: var(--color-text);
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

pre[class*="language-"] {
  background: var(--color-code-bg);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--color-code-bg);
  padding: 0.15em 0.35em;
  border-radius: 5px;
  font-size: 0.85em;
}

pre[class*="language-"] code {
  background: none;
  padding: 0;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #a094a3;
}
.token.punctuation {
  color: #7a6482;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
  color: #d1467a;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin {
  color: #4b8a63;
}
.token.operator,
.token.entity,
.token.url {
  color: #c17a1e;
}
.token.atrule,
.token.attr-value,
.token.keyword {
  color: var(--color-accent-dark);
}
.token.function,
.token.class-name {
  color: #4a72c9;
}
.token.regex,
.token.important,
.token.variable {
  color: #d1467a;
}

hr {
  border: none;
  height: 28px;
  margin: 2.5rem 0;
  background-repeat: repeat-x;
  background-position: center;
  background-size: 28px 14px;
  background-image: radial-gradient(circle at 50% 0%, var(--color-border) 40%, transparent 41%);
  opacity: 0.9;
}

/* ---------- Bio ---------- */

.bio {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 2.5rem;
  padding: 1rem 1.25rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
}

.bio-avatar {
  width: 3.75rem;
  height: 3.75rem;
  object-fit: cover;
  margin: 0;
  flex-shrink: 0;
  border-radius: 62% 38% 55% 45% / 45% 55% 40% 60%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--color-border);
}

.bio p {
  margin: 0;
}

/* ---------- Post list ---------- */

.post-summary {
  padding: 1.25rem 0;
  border-bottom: 1px dashed var(--color-border);
}

.post-summary:last-child {
  border-bottom: none;
}

.post-summary h3 {
  margin-bottom: 0.25rem;
  font-size: 1.4rem;
}

.post-summary small {
  color: var(--color-muted);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.post-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.post-nav li {
  flex: 1 1 auto;
}

.post-nav a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: var(--color-heading);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(60, 42, 70, 0.12);
  color: var(--color-accent-dark);
}

.post-nav-next {
  text-align: right;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--color-border);
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.6;
}
