/* ==========================================================
   Sassy on Tech — Micro.blog theme
   ========================================================== */

:root {
  --bg: #0E1016;
  --surface: #161922;
  --surface-2: #1E2230;
  --border: #262A36;
  --border-2: #343949;
  --text: #F2EFE9;
  --muted: #A7ACBA;
  --pink: #FF4D8D;
  --lime: #C8F031;
  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1200px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-script: "Yellowtail", cursive;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--pink); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

.pink { color: var(--pink); }
.lime { color: var(--lime); }
.muted { color: var(--muted); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 32px; padding-right: 32px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--lime); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons, tags, pills ---------- */

.btn { display: inline-block; font-size: 14px; font-weight: 600; padding: 12px 18px; border-radius: 999px; line-height: 1.2; }
.btn-pink { background: var(--pink); color: var(--bg); }
.btn-pink:hover { color: var(--bg); background: #ff6ea2; }
.btn-ghost { border: 1px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--pink); }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pink);
  margin: 0;
}
.tag:hover { color: var(--lime); }

.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills a { display: inline-block; font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-2); }
.pills a:hover { border-color: var(--pink); }
.pills--dark a { background: var(--bg); color: var(--text); border-color: var(--bg); font-weight: 600; }
.pills--dark a:hover { color: var(--lime); }

/* ---------- Logo ---------- */

.logo { display: inline-flex; align-items: baseline; gap: 12px; line-height: 1; white-space: nowrap; }
.logo-script { font-family: var(--font-script); font-size: 52px; color: var(--pink); font-weight: 400; letter-spacing: 0; }
.logo-s { font-size: 66px; margin-right: -2px; }
.logo-path { font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--lime); }
.logo--small { gap: 6px; }
.logo--small .logo-script { font-size: 22px; }
.logo--small .logo-s { font-size: 28px; margin-right: 0; }
.logo--small .logo-path { font-size: 13px; }

.cursor {
  display: inline-block;
  width: 10px; height: 20px;
  margin-left: 3px;
  vertical-align: -3px;
  background: var(--lime);
  animation: sassy-blink 1.1s steps(1) infinite;
}
@keyframes sassy-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--border); }
.site-header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding-top: 18px; padding-bottom: 18px; }
.logo-link:hover .logo-script { color: var(--pink); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 15px; font-weight: 500; }
.site-nav a[aria-current="page"] { color: var(--pink); }

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

.site-footer { border-top: 1px solid var(--border); margin-top: 24px; }
.site-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 28px; padding-bottom: 28px; font-size: 14px; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--pink); }

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

main.wrap { padding-top: 48px; padding-bottom: 72px; }
.section { margin-top: 64px; }
.home main .section:first-child, main > .section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: 30px; }
.section-head a { font-size: 14px; font-weight: 600; }

.with-sidebar { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.with-sidebar > .content-col, .with-sidebar > .post { flex: 999 1 560px; min-width: 0; }
.with-sidebar > .sidebar { flex: 1 1 280px; min-width: 0; }

/* ---------- Hero ---------- */

.hero-headline { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.03em; max-width: 820px; margin-bottom: 28px; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 24px; }
.hero-main { flex: 2 1 560px; min-width: 0; }
.hero-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

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

.card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-media { display: block; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-2); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-title a:hover { color: var(--pink); }
.card-meta { margin: 0; font-size: 13px; color: var(--muted); }
.card-excerpt { margin: 0; font-size: 17px; color: var(--muted); }

.card--hero .card-media { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.card--hero .card-title { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
.card-media--blank { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 30% 30%, #2a1f2e, var(--surface-2)); }
.card-media--blank span { font-family: var(--font-script); font-size: 160px; line-height: 1; color: var(--pink); opacity: .9; }

.card--side, .card--grid { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s ease; }
.card--side:hover, .card--grid:hover { border-color: var(--border-2); }
.card--side .card-media { aspect-ratio: 16 / 9; }
.card--side .card-title { font-size: 21px; line-height: 1.2; }
.card--grid .card-media { aspect-ratio: 16 / 10; }
.card--grid .card-title { font-size: 20px; line-height: 1.2; }

.row-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card--row { flex-direction: row; align-items: center; gap: 16px; }
.card--row .card-media { flex: 0 0 120px; height: 120px; border-radius: 14px; }
.card--row .tag { font-size: 11px; }
.card--row .card-title { font-size: 18px; line-height: 1.25; }
.card--row.card--noimg { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

/* ---------- Sidebar ---------- */

.sidebar { display: flex; flex-direction: column; gap: 24px; }
.box { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.box h2 { font-size: 20px; }
.box p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.box .avatar { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--pink); object-fit: cover; }
.box .more { font-size: 14px; font-weight: 600; color: var(--lime); }
.box--pink { background: var(--pink); border-color: var(--pink); color: var(--bg); }
.box--pink p { color: var(--bg); }

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

.post-header { margin-bottom: 32px; display: flex; flex-direction: column; gap: 14px; }
.post-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.post-title { font-size: clamp(32px, 4.5vw, 48px); line-height: 1.08; letter-spacing: -0.03em; }
.post-meta { margin: 0; font-size: 14px; color: var(--muted); }
.post-meta a { color: var(--muted); }

.post-content { font-size: 18px; line-height: 1.7; max-width: 72ch; }
.post-content > *:first-child { margin-top: 0; }
.post-content p, .post-content ul, .post-content ol { margin: 0 0 1.25em; }
.post-content h2 { font-size: 28px; margin: 1.8em 0 .6em; }
.post-content h3 { font-size: 22px; margin: 1.6em 0 .5em; }
.post-content a { color: var(--pink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-content a:hover { color: var(--lime); }
.post-content img { border-radius: var(--radius-sm); margin: .5em 0; }
.post-content li { margin-bottom: .4em; }
.post-content hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.post-content blockquote { margin: 1.5em 0; padding: 18px 22px; background: var(--surface); border-radius: var(--radius-sm); color: var(--muted); font-style: italic; }
.post-content blockquote p:last-child { margin-bottom: 0; }

.post-content code { font-family: var(--font-mono); font-size: .85em; background: var(--surface-2); color: var(--lime); padding: .15em .4em; border-radius: 6px; }
.post-content pre { background: #090A0F; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; overflow-x: auto; line-height: 1.5; margin: 0 0 1.5em; }
.post-content pre code { background: none; padding: 0; color: var(--text); font-size: 14px; }

.post-content table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 0 1.5em; display: block; overflow-x: auto; }
.post-content th, .post-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.post-content th { font-family: var(--font-head); color: var(--text); }

.post-replies, .post-conversation { margin-top: 40px; }
.post-replies a { color: var(--lime); font-weight: 600; margin-right: 16px; }

.post-nav { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 24px; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; max-width: 48%; font-family: var(--font-head); font-weight: 700; }
.post-nav a .lime { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.post-nav a.older { text-align: right; margin-left: auto; }

/* Pages (About etc.) */
.page { max-width: 760px; }
.page .post-title { margin-bottom: 28px; }

/* ---------- Lists & archive ---------- */

.list-header { margin-bottom: 32px; display: flex; flex-direction: column; gap: 10px; }
.list-intro { color: var(--muted); }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; }
.pagination-count { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.archive { max-width: 860px; }
.archive-topics { margin-bottom: 40px; }
.archive-topics .muted { font-family: var(--font-mono); font-size: 11px; margin-left: 4px; }
.archive-year { margin-bottom: 40px; }
.archive-year h2 { font-size: 30px; color: var(--pink); margin-bottom: 12px; }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { display: flex; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.archive-list time { flex: 0 0 64px; font-family: var(--font-mono); font-size: 13px; color: var(--lime); }
.archive-list .p-summary { color: var(--muted); }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  main.wrap { padding-top: 32px; }
  .logo-script { font-size: 42px; }
  .logo-s { font-size: 54px; }
  .logo-path { font-size: 15px; }
  .site-header .btn { display: none; }
  .site-nav ul { gap: 8px 18px; font-size: 14px; }
  .card--row .card-media { flex-basis: 88px; height: 88px; }
  .post-content { font-size: 17px; }
}
