/* blsmth.com: dark slate, deep purple + teal. Plain CSS, no framework. */

:root {
  --bg: hsl(225, 15%, 5%);
  --fg: hsla(225, 15%, 90%, 0.82);
  --fg-strong: hsl(225, 15%, 96%);
  --fg-lightest: hsla(225, 15%, 90%, 0.12);
  --code-bg: hsl(225, 20%, 10%);
  --code-fg: hsl(225, 20%, 80%);
  --primary: #7e56c2;
  --accent: #00bda4;
  --accent-soft: rgba(0, 191, 165, 0.15);
  --link: #a47bea;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

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

html {
  font-size: 125%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, -apple-system, "system-ui", Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--fg);
  background:
    radial-gradient(ellipse 70% 100% at 18% 22%, rgba(128, 90, 213, 0.22) 0%, transparent 60%) fixed,
    radial-gradient(ellipse 60% 80% at 88% 85%, rgba(0, 191, 165, 0.09) 0%, transparent 55%) fixed,
    var(--bg);
}

a {
  color: var(--link);
}

/* -- Header + tabs ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.5rem 2rem 0;
  background: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.logo {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
  text-decoration: none;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0.4rem 0 0 -0.6rem;
  overflow-x: auto;
}

.tabs a {
  padding: 0.55rem 0.6rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  opacity: 0.65;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: opacity 0.2s, color 0.2s;
}

.tabs a:hover {
  opacity: 1;
  color: var(--accent);
}

.tabs a.active {
  opacity: 1;
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding: 1.5rem 2rem;
  font-size: 0.7rem;
  opacity: 0.8;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--fg);
}

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

.icon svg {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  vertical-align: -0.2em;
}

/* -- Prose --------------------------------------------------------------- */

.content {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 2rem 7rem;
}

.typeset h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg-strong);
  margin: 0 0 1.5rem;
}

/* Section headings are labels, like the home page's "// currently" */
.typeset h2 {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: lowercase;
  margin: 3.5rem 0 1.25rem;
}

.typeset h2::before {
  content: "// ";
}

.typeset h2 .headerlink {
  display: none;
}

.typeset h3 {
  font-size: 1.25em;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg-strong);
  margin: 2em 0 0.8em;
}

.typeset h4 {
  font-weight: 700;
  color: var(--fg-strong);
}

/* Lede: first paragraph after the page h1 */
.typeset h1 + p {
  font-size: 1.2rem;
  line-height: 1.55;
  opacity: 0.82;
  margin-bottom: 2.75rem;
  max-width: 38rem;
}

.typeset p,
.typeset li {
  font-size: 1rem;
  line-height: 1.7;
}

.typeset p {
  margin: 1em 0;
}

.typeset strong {
  color: var(--fg-strong);
}

.typeset .headerlink {
  margin-left: 0.4em;
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.typeset :is(h1, h3, h4):hover .headerlink {
  opacity: 0.6;
}

.typeset img {
  max-width: 100%;
  height: auto;
  border-radius: 0.4rem;
}

.typeset hr {
  border: 0;
  border-top: 1px solid var(--fg-lightest);
  margin: 2.5rem 0;
}

.typeset blockquote {
  margin: 1.25rem 0;
  padding: 0 1rem;
  border-left: 3px solid var(--primary);
  opacity: 0.9;
}

.typeset code {
  font-family: var(--mono);
  font-size: 0.85em;
  padding: 0.1em 0.4em;
  border-radius: 0.25rem;
  background: var(--code-bg);
  color: var(--code-fg);
}

.typeset pre {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border-radius: 0.5rem;
  background: var(--code-bg);
  line-height: 1.5;
}

.typeset pre code,
.typeset .highlight pre {
  padding: 0;
  background: transparent;
  font-size: 0.75rem;
}

.typeset .highlight {
  margin: 1.25rem 0;
}

.typeset .highlight pre {
  margin: 0;
}

.typeset table {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  margin: 1.25rem 0;
}

.typeset th,
.typeset td {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--fg-lightest);
  text-align: left;
}

.typeset .admonition,
.typeset details {
  margin: 1.5rem 0;
  padding: 0.25rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0.3rem;
  background: var(--code-bg);
}

.typeset .admonition-title,
.typeset summary {
  font-weight: 700;
  color: var(--fg-strong);
  margin: 0.5rem 0;
}

/* -- Blog ---------------------------------------------------------------- */

.post-link {
  margin-bottom: 0.4rem !important;
}

.post-link a {
  color: var(--fg-strong);
  text-decoration: none;
}

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

.post-link + p {
  margin-top: 0.4rem;
}

.post-back,
.feed-link {
  margin-top: 3.5rem !important;
  font-family: var(--mono);
  font-size: 0.8rem !important;
}

/* -- Cards ---------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  padding: 1.75rem;
  border-radius: 0.75rem;
  background: var(--code-bg);
  border: 1px solid var(--fg-lightest);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.typeset .card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.card p {
  margin-bottom: 0.5rem;
}

/* -- Tag chips ------------------------------------------------------------ */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 1rem;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* -- Timeline (experience) ------------------------------------------------ */

.typeset .timeline-entry {
  padding: 0.25rem 0 1.5rem 1.5rem;
  margin-bottom: 1.75rem;
  border-left: 1px solid rgba(0, 191, 165, 0.3);
  opacity: 0.92;
  transition: border-left-color 0.2s, opacity 0.2s;
}

.typeset .timeline-entry:hover {
  border-left-color: var(--accent);
  opacity: 1;
}

.typeset .timeline-entry h3 {
  margin: 0 0 0.15rem;
  font-size: 1.15rem;
}

.typeset .timeline-entry p {
  margin: 0.5rem 0 0.75rem;
}

.typeset .timeline-entry ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.typeset .timeline-entry li {
  margin-bottom: 0.35rem;
  line-height: 1.65;
}

.timeline-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  opacity: 0.65;
  margin-bottom: 0.85rem;
  letter-spacing: 0.01em;
}

@media (prefers-reduced-motion: no-preference) {
  .typeset .timeline-entry {
    animation: timeline-fade-in 0.5s ease-out backwards;
  }

  @keyframes timeline-fade-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }

    to {
      opacity: 0.92;
      transform: translateY(0);
    }
  }
}

/* -- Contact: social links ------------------------------------------------ */

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--fg);
  background: var(--code-bg);
  border: 1px solid var(--fg-lightest);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
  color: var(--accent);
}

/* -- Home ----------------------------------------------------------------- */

.home {
  flex: 1;
  padding: 5rem 2rem 7rem;
}

.home__inner {
  max-width: 48rem;
  margin: 0 auto;
}

.home__name {
  font-size: clamp(2.5rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg-strong);
  margin: 0 0 1.5rem;
}

.home__subtitle {
  font-size: clamp(1.05rem, 2.1vw, 1.25rem);
  line-height: 1.55;
  max-width: 38rem;
  margin: 0 0 3.5rem;
  opacity: 0.88;
}

.home__currently-label {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.home__currently-list {
  list-style: none;
  padding: 0;
  margin: 0 0 3.5rem;
  max-width: 42rem;
}

.home__currently-list li {
  font-size: 1.05rem;
  line-height: 1.6;
  padding: 0.55rem 0 0.65rem 1.25rem;
  border-left: 1px solid rgba(0, 191, 165, 0.3);
  margin-bottom: 0.35rem;
  opacity: 0.92;
  transition: border-left-color 0.2s, opacity 0.2s;
}

.home__currently-list li:hover {
  border-left-color: var(--accent);
  opacity: 1;
}

.home__currently-list code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(0, 191, 165, 0.14);
  color: var(--fg-strong);
  padding: 1px 6px;
  border-radius: 4px;
}

.home__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.home__nav a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 191, 165, 0.35);
  padding-bottom: 2px;
  transition: border-color 0.2s, opacity 0.2s;
}

.home__nav a:hover {
  border-bottom-color: var(--accent);
  opacity: 0.85;
}

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

@media (max-width: 480px) {
  html {
    font-size: 112.5%;
  }

  .site-header,
  .site-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .content {
    padding: 3rem 1.25rem 4.5rem;
  }

  .home {
    padding: 3rem 1.25rem 4.5rem;
  }

  .home__nav {
    gap: 1rem;
    flex-direction: column;
  }
}

/* md_in_html wraps inline content in a <p>; flatten it so flex gap applies */
.social-links > p {
  display: contents;
}
