/* Made with Love. Yavuz CC BY 4.0 */

@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/nunitosans.woff2) format('woff2');
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/nunitosans-italic.woff2) format('woff2');
}

:root {
  --bg: #f5f6f9;
  --surface: #ffffff;
  --surface-sunk: #eef1f6;
  --text: #14181f;
  --muted: #4b566f;
  --border: rgba(34, 53, 80, 0.12);
  --border-strong: rgba(34, 53, 80, 0.2);
  --accent: #2350d9;
  --accent-strong: #0d38b8;
  --accent-tint: rgba(35, 80, 217, 0.08);
  --ring: rgba(35, 80, 217, 0.4);

  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  --content: 720px;
  --col: 760px;
  --wrap: 960px;

  --font: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --shadow-1: 0 1px 2px rgba(20, 24, 31, 0.05), 0 2px 10px rgba(20, 24, 31, 0.05);
  --shadow-2: 0 6px 20px rgba(20, 24, 31, 0.08);

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur: 180ms;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.col { max-width: var(--col); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--r-1);
  box-shadow: var(--shadow-2);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top)); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .site-header {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
  }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand .mark { width: 30px; height: 30px; border-radius: 8px; }
.brand .name { font-size: 1.125rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand .name b { font-weight: 700; }
.brand .name .sep { font-weight: 400; color: var(--muted); margin: 0 0.18em; }
.brand .name i { font-style: italic; font-weight: 400; }

.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 4px 0;
  transition: color var(--dur) var(--ease);
}
.nav a:hover, .nav a:focus-visible { color: var(--accent); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }

main { display: block; padding-block: var(--s-6) var(--s-7); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: 0 auto var(--s-5);
  max-width: var(--col);
}
.filter {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 13px;
  border-radius: 999px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}
.filter:hover { color: var(--accent); border-color: var(--border-strong); }
.filter[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.feed { list-style: none; margin: 0; padding: 0; max-width: var(--col); margin-inline: auto; }
.feed-entry {
  position: relative;
  border-top: 1px solid var(--border);
  padding: var(--s-5) var(--s-4);
  border-left: 2px solid transparent;
  transition: transform var(--dur) var(--ease), border-left-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}
.feed-entry:last-child { border-bottom: 1px solid var(--border); }
.feed-entry:hover {
  transform: translateX(3px);
  border-left-color: var(--accent);
  background: var(--accent-tint);
}
.feed-entry .date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.feed-entry .title {
  font-size: 1.3rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 6px 0 8px;
}
.feed-entry .title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.feed-entry .title a::after { content: ""; position: absolute; inset: 0; }
.feed-entry:hover .title a { color: var(--accent); }
.feed-entry .excerpt { color: var(--muted); font-size: 1rem; line-height: 1.6; margin: 0 0 10px; }
.feed-entry .tags { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--accent-strong);
  background: var(--accent-tint);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 999px;
}

.feed-empty,
.feed-loading {
  max-width: var(--col);
  margin-inline: auto;
  padding: var(--s-6) var(--s-4);
  color: var(--muted);
  list-style: none;
}

.notfound {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--s-8) 0 var(--s-7);
  text-align: center;
}
.notfound .code {
  display: inline-block;
  margin-bottom: var(--s-3);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.notfound h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
}
.notfound p { max-width: 48ch; margin: 0 auto var(--s-4); color: var(--muted); }
.notfound .btn { display: inline-block; margin-top: var(--s-2); text-decoration: none; }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--s-8);
  padding-block: var(--s-6);
  padding-bottom: calc(var(--s-6) + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  align-items: center;
  justify-content: space-between;
}
.site-footer p { margin: 0; }
.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.post { padding-bottom: var(--s-6); }
.post-header { max-width: var(--content); margin: 0 auto; padding: var(--s-7) 0 var(--s-5); }
.post-back {
  display: inline-block;
  margin-bottom: var(--s-4);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.post-back:hover { color: var(--accent); }
.post-header h1 {
  font-size: clamp(1.9rem, 5vw, 2.45rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-3);
}
.post-header .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  color: var(--muted);
  font-size: 0.9rem;
}
.post-header time { font-weight: 600; }
.post-header .tags { display: flex; flex-wrap: wrap; gap: 6px; }

.post-content {
  max-width: var(--content);
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
}
.post-content h1 { font-size: 2em; margin: 1.5em 0 0.4em; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.post-content h2 { font-size: 1.5em; margin: 1.4em 0 0.4em; line-height: 1.3; font-weight: 700; }
.post-content h3 { font-size: 1.2em; margin: 1.3em 0 0.4em; line-height: 1.4; font-weight: 700; }
.post-content p { margin: 0.85em 0; }
.post-content ul, .post-content ol { margin: 0.85em 0 0.85em 1.6em; }
.post-content li { margin: 0.3em 0; }
.post-content li::marker { color: var(--muted); }
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--dur) var(--ease);
}
.post-content a:hover { color: var(--accent-strong); }
.post-content code {
  background: var(--surface-sunk);
  padding: 2px 6px;
  border-radius: var(--r-1);
  font-family: var(--mono);
  font-size: 0.875em;
}
.post-content pre {
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--r-2);
  overflow-x: auto;
  margin: 1.2em 0;
}
.post-content pre code { background: none; padding: 0; font-size: 0.85em; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.2em 0 0.2em 1.2em;
  margin: 1.2em 0;
  color: var(--muted);
  font-style: italic;
}
.post-content mark { background: #fff176; border-radius: 2px; padding: 0 2px; }
.post-content s { opacity: 0.6; }
.post-content sup, .post-content sub { font-size: 0.75em; line-height: 0; }
.post-content img {
  width: 100%;
  height: auto;
  border-radius: var(--r-2);
  border: 1px solid var(--border);
  margin: 1.5em 0;
}
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.post-content figure { margin: 1.5em 0; }
.post-content figcaption { font-size: 0.875rem; color: var(--muted); text-align: center; margin-top: 0.5em; }

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .site-header .wrap { min-height: 54px; gap: var(--s-3); }
  .nav { gap: var(--s-4); }
  .brand .name { font-size: 1.05rem; }
  .feed-entry { padding: var(--s-4) var(--s-3); }
  .post-header { padding-top: var(--s-5); }
  main { padding-block: var(--s-5) var(--s-6); }
}

.brand .mark { border-radius: 0; }

.page-intro {
  max-width: var(--col);
  margin: 0 auto var(--s-6);
  padding: 28px clamp(20px, 4vw, 36px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
    var(--accent-tint);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.page-intro .eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-intro p { margin: 0; font-size: 1.05rem; line-height: 1.7; color: #2c333f; }

.about {
  max-width: var(--col);
  margin: var(--s-7) auto 0;
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}
.about h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: var(--s-3); }
.about p { color: var(--muted); margin: 0 0 var(--s-3); }
.about .about-links { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.about .about-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.about .about-links a:hover { border-bottom-color: var(--accent); }

.foot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.linklike {
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.linklike:hover { color: var(--accent); border-bottom-color: var(--accent); }
.visits { color: var(--muted); font-size: 0.9rem; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 40px);
  background: rgba(20, 24, 31, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
@supports ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
  .overlay {
    background: rgba(20, 24, 31, 0.32);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
  }
}
html.needs-consent #consent,
.overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: overlay-in var(--dur) var(--ease);
}
html.needs-consent,
html.modal-open { overflow: hidden; }

.overlay .sheet {
  width: 100%;
  max-width: 640px;
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  padding: var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.overlay .sheet--narrow { max-width: 460px; }
html.needs-consent #consent .sheet,
.overlay.is-open .sheet {
  opacity: 1;
  transform: none;
  animation: sheet-in calc(var(--dur) + 50ms) var(--ease);
}

@keyframes overlay-in { from { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } }

#consent h2, .sheet-head h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
#consent p { margin: var(--s-3) 0 var(--s-5); color: var(--text); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); justify-content: flex-end; }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border);
}
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.legal-text p { margin: 0 0 var(--s-3); line-height: 1.7; color: var(--text); }
.legal-text p:first-child { color: var(--muted); font-size: 0.9rem; }

.btn,
.btn-ghost,
.sheet-close { font: inherit; font-weight: 600; cursor: pointer; border-radius: var(--r-1); }
.btn {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 9px 18px;
  transition: background var(--dur) var(--ease);
}
.btn:hover { background: var(--accent-strong); }
.btn-ghost {
  color: var(--accent);
  background: none;
  border: 1px solid var(--border-strong);
  padding: 9px 16px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn-ghost:hover { color: var(--accent-strong); border-color: var(--accent); }
.sheet-close {
  font-size: 0.9rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  padding: 5px 12px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.sheet-close:hover { color: var(--accent); border-color: var(--border-strong); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition: none !important; }
}
