/* Import a clean, legible sans-serif family for body and headings */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
  color-scheme: light dark;
  --bg: #0b1015;
  --bg-alt: #111823;
  --bg-soft: #151d2a;
  --fg: #f5f5f7;
  --muted: #9da4b3;
  --accent: #7bdcff;
  --accent-soft: rgba(123, 220, 255, 0.12);
  --accent-strong: #ffdd7b;
  --border-subtle: #252d3a;
  --code-bg: #05070b;
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "DM Serif Display", "Georgia", "Times New Roman", serif;
}

/* Base layout and typography */

body {
  margin: 0;
  font: 0.98rem/1.7 var(--font-sans);
  background: radial-gradient(circle at top left, #151d2a 0, #05070b 45%, #020309 100%);
  color: var(--fg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Links */

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.07em;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Top strip */

.strip {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem 1.2rem;
  padding: 0.55rem 1.1rem;
  font: 0.78rem/1.4 var(--font-sans);
  background: rgba(3, 6, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(93, 116, 164, 0.45);
}

.strip span {
  color: var(--muted);
  opacity: 0.9;
}

/* Main width and rhythm */

.masthead,
main,
.colophon {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Masthead */

.masthead {
  padding-top: 2.6rem;
  padding-bottom: 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  grid-column-gap: 1rem;
  align-items: center;
}

.avatar {
  grid-row: 1 / span 2;
  grid-column: 1;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0;
  border-radius: 26%;
  border: 1px solid rgba(123, 220, 255, 0.5);
  background: radial-gradient(circle at 30% 20%, #ffdd7b 0, #ff7ba5 26%, #7bdcff 55%, #151d2a 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(123, 220, 255, 0.45);
}

.blog-title {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin: 0;
}

.blog-title a {
  color: var(--fg);
  text-decoration: none;
}

.blog-title a:hover {
  color: var(--accent-strong);
}

.tagline {
  grid-column: 2;
  grid-row: 2;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Main content */

main {
  padding-bottom: 3.5rem;
  overflow-wrap: anywhere;
}

/* About section */

.about {
  margin-top: 1.4rem;
  padding: 1.1rem 1.1rem 1.2rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top right, rgba(123, 220, 255, 0.22), transparent 55%),
              linear-gradient(135deg, rgba(14, 22, 36, 0.96), rgba(6, 10, 18, 0.98));
  border: 1px solid rgba(123, 220, 255, 0.2);
  box-shadow:
    0 18px 45px rgba(3, 5, 10, 0.85),
    0 0 0 1px rgba(4, 8, 16, 0.8);
}

.about p {
  margin: 0 0 0.7rem;
}

.about p:last-child {
  margin-bottom: 0;
}

.about ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 0.2rem;
}

.about li {
  margin: 0.1rem 0;
}

/* Posts list */

.posts {
  margin-top: 2.4rem;
}

.posts h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 0.7rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, rgba(15, 21, 33, 0.9), rgba(8, 11, 19, 0.95));
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.post-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid rgba(35, 44, 64, 0.9);
}

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

.post-link {
  font-weight: 500;
}

.post-link:hover {
  color: var(--accent-strong);
}

time {
  font: 0.8rem var(--font-sans);
  color: var(--muted);
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.6rem;
}

/* Headings in posts */

article {
  margin-top: 1.2rem;
  padding: 1.1rem 1.1rem 1.4rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top left, rgba(255, 221, 123, 0.15), transparent 55%),
              linear-gradient(145deg, rgba(13, 19, 32, 0.98), rgba(6, 9, 16, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow:
    0 18px 55px rgba(2, 4, 10, 0.9),
    0 0 0 1px rgba(7, 10, 20, 0.95);
}

.post-header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: 0.03em;
  margin: 0 0 0.4rem;
}

.post-header time {
  display: block;
}

/* General headings inside post body */

h1, h2, h3, h4 {
  color: var(--fg);
}

h1 {
  margin: 2rem 0 0.4rem;
}

h2 {
  font-size: 1.2rem;
  margin: 1.8rem 0 0.4rem;
}

h3, h4 {
  font-size: 1rem;
  margin: 1.3rem 0 0.3rem;
}

/* Text elements */

p {
  margin: 0 0 0.9rem;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* Blockquotes */

blockquote {
  margin: 1.1rem 0;
  padding: 0.2rem 0 0.2rem 0.9rem;
  border-left: 3px solid rgba(123, 220, 255, 0.7);
  color: #d0d4e0;
  background: linear-gradient(90deg, rgba(123, 220, 255, 0.08), transparent);
}

/* Code */

code {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.12em 0.32em;
  border-radius: 0.23em;
  border: 1px solid rgba(77, 91, 122, 0.8);
}

pre {
  overflow-x: auto;
  padding: 0.85rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(44, 55, 80, 0.9);
  font-size: 0.86rem;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(123, 220, 255, 0.16), transparent 55%),
    #020308;
}

/* Horizontal rule */

hr {
  border: 0;
  border-top: 1px solid rgba(51, 62, 87, 0.9);
  margin: 2rem 0;
}

/* Notices and colophon */

.notice {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 1.5rem;
}

.receipt,
.colophon {
  font: 0.78rem/1.5 var(--font-sans);
  color: var(--muted);
}

.receipt {
  margin-top: 2.2rem;
}

.colophon {
  border-top: 1px solid rgba(35, 44, 64, 0.9);
  padding-top: 1.2rem;
  padding-bottom: 3rem;
  max-width: 48rem;
}

/* Small-screen adjustments */

@media (max-width: 640px) {
  .masthead {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    align-items: start;
  }

  .avatar {
    width: 4rem;
    height: 4rem;
  }

  .blog-title {
    font-size: 1.7rem;
  }

  .about,
  article {
    padding: 0.9rem 0.85rem 1.1rem;
  }

  .post-list li {
    padding: 0.65rem 0.75rem;
  }

  .strip {
    padding-inline: 0.9rem;
  }
}

/* Subtle accent underlines for sections */

.about h2,
.posts h2,
.post-body h2 {
  position: relative;
  display: inline-block;
}

.about h2::after,
.posts h2::after,
.post-body h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 2.4rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.85;
}

/* Highlight inline elements that feel "active thought" */

.post-body em {
  background: linear-gradient(90deg, rgba(255, 221, 123, 0.12), transparent);
  padding: 0 0.07em;
  border-radius: 0.18em;
}

/* Soft accent highlighting for key phrases in About */

.about strong {
  color: var(--accent-strong);
  font-weight: 600;
}

/* Slight glow behind main content area on large screens */

@media (min-width: 900px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 15% 10%, rgba(123, 220, 255, 0.18), transparent 55%),
      radial-gradient(circle at 85% 90%, rgba(255, 221, 123, 0.12), transparent 55%);
    opacity: 0.8;
    z-index: -1;
  }
}
