:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-wash: #f8fafc;
  --text: #18181b;
  --text-soft: #3f3f46;
  --muted: #71717a;
  --muted-soft: #a1a1aa;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --code-bg: #f4f4f5;
  --max-list: 820px;
  --max-article: 700px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.07), transparent 320px) no-repeat,
    radial-gradient(circle at 86% 12%, rgba(24, 24, 27, 0.045), transparent 260px) no-repeat,
    linear-gradient(rgba(24, 24, 27, 0.028) 1px, transparent 1px) 0 0 / 42px 42px no-repeat,
    linear-gradient(90deg, rgba(24, 24, 27, 0.028) 1px, transparent 1px) 0 0 / 42px 42px no-repeat,
    linear-gradient(180deg, #fafafa 0, #ffffff 240px) no-repeat,
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.site-header,
.site-footer,
.page-shell {
  width: min(var(--max-list), calc(100% - 40px));
  margin: 0 auto;
}

.blog-layout {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(160px, 176px) minmax(0, 820px);
  gap: 44px;
  align-items: start;
}

.blog-layout .page-shell {
  width: 100%;
}

.blog-layout .page-shell::before {
  display: none;
}

.page-shell {
  position: relative;
}

.page-shell::before {
  content: "SaaS / AI / INFRA / PROJECTS";
  position: absolute;
  left: -118px;
  top: 98px;
  color: var(--muted-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-90deg);
  transform-origin: left top;
  white-space: nowrap;
}

body[data-language="tr"] .page-shell::before {
  content: "SaaS / AI / ALTYAPI / PROJELER";
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0;
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff 0 16%, transparent 18%),
    var(--text);
  box-shadow:
    0 0 0 5px rgba(24, 24, 27, 0.05),
    14px 0 0 -3px rgba(37, 99, 235, 0.28);
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 9px;
  border-radius: 999px;
  text-decoration: none;
}

.nav a:hover {
  background: #f4f4f5;
  color: var(--text);
}

.nav a[aria-current="page"] {
  color: var(--text);
  background: #f4f4f5;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  min-height: 34px;
  margin-left: 4px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted-soft);
}

.language-switcher a {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 680;
}

.language-switcher a[aria-current="page"] {
  background: var(--text);
  color: #fff;
}

.intro {
  position: relative;
  margin-bottom: 32px;
  padding: 0 0 38px;
  border-bottom: 1px solid var(--border);
}

.intro::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-bottom: 26px;
  background: linear-gradient(90deg, var(--text), var(--text) 58%, var(--accent) 58%, var(--accent));
}

.intro::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 38px;
  width: 92px;
  height: 92px;
  opacity: 0.55;
  background-image: radial-gradient(circle, rgba(24, 24, 27, 0.22) 1px, transparent 1.5px);
  background-size: 12px 12px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.intro h1,
.page-title {
  margin: 0 0 16px;
  max-width: 760px;
  font-size: clamp(44px, 8vw, 78px);
  line-height: 0.96;
  letter-spacing: 0;
  font-weight: 780;
}

.intro p,
.page-description {
  margin: 0;
  max-width: 680px;
  color: var(--text-soft);
  font-size: 19px;
  line-height: 1.75;
}

.category-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 26px;
  margin: 0 0 4px;
  scrollbar-width: thin;
}

.blog-layout .category-row {
  display: none;
}

.category-row::before {
  content: "Index";
  flex: 0 0 auto;
  align-self: center;
  margin-right: 6px;
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-language="tr"] .category-row::before {
  content: "Dizin";
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(24, 24, 27, 0.03);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.pill:hover,
.pill[aria-current="page"] {
  border-color: var(--border-strong);
  color: var(--text);
  background: #f4f4f5;
}

.pill:hover {
  transform: translateY(-1px);
}

.post-list {
  min-height: 180px;
  border-top: 1px solid var(--border);
  counter-reset: post;
}

.project-showcase {
  margin: 4px 0 34px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.project-showcase-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.project-showcase-head .eyebrow {
  margin: 0 0 6px;
}

.project-showcase h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-card {
  position: relative;
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.075), transparent 86px),
    #f4f4f5;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #c7c7cc;
  background: #eeeeef;
  color: var(--text);
}

.project-card::after {
  content: "↗";
  position: absolute;
  right: 14px;
  top: 12px;
  color: var(--muted-soft);
  font-size: 13px;
  opacity: 0;
  transform: translate(-2px, 2px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.project-card:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.project-card img {
  display: block;
  max-width: 150px;
  max-height: 34px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 18px;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.post-item {
  position: relative;
  counter-increment: post;
  padding: 31px 0 32px 58px;
  border-bottom: 1px solid var(--border);
  transition: transform 180ms ease, border-color 180ms ease;
}

.post-item::before {
  content: counter(post, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 34px;
  width: 34px;
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.post-item::after {
  content: "";
  position: absolute;
  left: 42px;
  top: 33px;
  width: 2px;
  height: calc(100% - 64px);
  min-height: 44px;
  border-radius: 999px;
  background: var(--border);
  transition: background 180ms ease, transform 180ms ease;
}

.post-item:hover::after {
  background: var(--accent);
  transform: scaleY(1.08);
}

.post-item:hover {
  transform: translateX(3px);
  border-bottom-color: var(--border-strong);
}

.post-item h2 {
  margin: 0 0 9px;
  max-width: 660px;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 730;
}

.post-item h2 a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}

.post-item h2 a::after {
  content: "→";
  color: var(--muted-soft);
  font-size: 18px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.post-item:hover h2 a::after {
  opacity: 1;
  transform: translateX(0);
}

.post-item p {
  margin: 0 0 15px;
  max-width: 620px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.meta time,
.meta > span:not([aria-hidden="true"]) {
  display: inline-flex;
  align-items: center;
}

.placeholder-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #52525b;
  background: #fff;
  font-size: 12px;
}

.empty-state {
  position: relative;
  margin: 0 0 54px;
  padding: 42px 0 46px 58px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(228, 228, 231, 0.9), rgba(228, 228, 231, 0)) 0 0 / 120px 1px no-repeat;
}

.empty-state::before {
  content: "∅";
  position: absolute;
  left: 0;
  top: 39px;
  color: var(--muted-soft);
  font-size: 28px;
  line-height: 1;
}

.empty-state h2 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 720;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 84px;
  padding: 24px 0 38px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a {
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

.article-layout {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(150px, 168px) minmax(0, var(--max-article)) minmax(200px, 236px);
  gap: 46px;
  align-items: start;
  position: relative;
}

.article-layout::before {
  content: "";
  position: absolute;
  left: 198px;
  top: 2px;
  width: 1px;
  height: 210px;
  background: linear-gradient(var(--text), var(--border));
}

.category-rail,
.toc {
  position: sticky;
  top: 96px;
  color: var(--muted);
  font-size: 14px;
}

.category-rail {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.07), transparent 78px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 250, 250, 0.9)),
    var(--bg-soft);
  box-shadow: 0 1px 0 rgba(24, 24, 27, 0.03);
}

.category-rail::before {
  content: "";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  opacity: 0.45;
  background-image: radial-gradient(circle, rgba(24, 24, 27, 0.26) 1px, transparent 1.5px);
  background-size: 8px 8px;
  pointer-events: none;
}

.side-label,
.toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 720;
  letter-spacing: 0.04em;
}

.side-label::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--text), var(--accent));
}

.side-label::after {
  content: "INDEX";
  margin-left: auto;
  color: var(--muted-soft);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.14em;
}

body[data-language="tr"] .side-label::after {
  content: "DIZIN";
}

.category-rail nav {
  display: grid;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  counter-reset: rail;
}

.category-rail a {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 8px;
  align-items: center;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.2;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
  counter-increment: rail;
}

.category-rail a::before {
  content: "0" counter(rail);
  color: var(--muted-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  transition: color 160ms ease;
}

.category-rail a:hover {
  background: rgba(244, 244, 245, 0.92);
  color: var(--text);
  transform: translateX(1px);
}

.category-rail a:hover::before {
  color: var(--accent);
}

.category-rail a[aria-current="page"] {
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(228, 228, 231, 0.85);
}

.category-rail a[aria-current="page"]::before {
  color: var(--accent);
}

.category-rail a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.article-category-row {
  display: none;
}

.article-main {
  min-width: 0;
}

.article-header {
  position: relative;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 34px;
}

.article-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 120px;
  height: 1px;
  background: var(--text);
}

.article-header .eyebrow {
  margin-bottom: 16px;
}

.article-header h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
  font-weight: 780;
}

.article-body {
  font-size: 18px;
  line-height: 1.82;
  counter-reset: section;
}

.article-body h2,
.article-body h3 {
  line-height: 1.25;
  letter-spacing: 0;
  scroll-margin-top: 96px;
}

.article-body h2 {
  position: relative;
  counter-increment: section;
  margin: 52px 0 16px;
  padding-top: 8px;
  font-size: 30px;
  font-weight: 760;
}

.article-body h2::before {
  content: "0" counter(section);
  display: block;
  margin-bottom: 9px;
  color: var(--muted-soft);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.article-body h3 {
  margin: 36px 0 12px;
  font-size: 22px;
  font-weight: 720;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre,
.article-body table {
  margin: 0 0 22px;
}

.article-body a {
  color: var(--accent);
  text-decoration-thickness: 1px;
}

.article-body code {
  padding: 0.15em 0.35em;
  border-radius: 5px;
  background: var(--code-bg);
  font-size: 0.9em;
}

.article-body pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-wash);
  line-height: 1.55;
}

.article-body pre code {
  padding: 0;
  background: transparent;
}

.article-body blockquote {
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--text);
  color: var(--text-soft);
  font-size: 17px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.table-wrap,
.article-body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.article-body th,
.article-body td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
}

.toc {
  padding: 14px 0 0 18px;
  border-left: 1px solid var(--border);
}

.toc-title {
  font-size: 13px;
  font-weight: 680;
  letter-spacing: 0;
}

.toc-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid var(--text);
  border-radius: 50%;
}

.toc nav {
  display: grid;
  gap: 7px;
}

.toc a {
  display: block;
  padding: 3px 0 3px 10px;
  border-left: 2px solid transparent;
  text-decoration: none;
}

.toc a[data-level="3"] {
  margin-left: 12px;
}

.toc a.is-active {
  border-left-color: var(--accent);
  color: var(--text);
}

.toc:empty {
  display: none;
}

@media (max-width: 1100px) {
  .blog-layout {
    display: block;
    width: min(var(--max-list), calc(100% - 40px));
  }

  .blog-layout .category-row {
    display: flex;
  }

  .article-layout {
    width: min(900px, calc(100% - 40px));
    grid-template-columns: minmax(0, var(--max-article)) minmax(184px, 224px);
    gap: 54px;
  }

  .category-rail,
  .article-layout::before {
    display: none;
  }

  .article-category-row {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 0 0 22px;
    margin: -4px 0 4px;
    scrollbar-width: thin;
  }
}

@media (max-width: 860px) {
  .page-shell::before,
  .article-layout::before {
    display: none;
  }

  .article-layout {
    display: block;
    width: min(var(--max-article), calc(100% - 40px));
  }

  .toc {
    position: static;
    margin: 0 0 28px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
  }
}

@media (max-width: 520px) {
  .site-header,
  .site-footer,
  .page-shell,
  .article-layout {
    width: min(100% - 32px, var(--max-list));
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 0 40px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 4px;
    margin-left: -9px;
  }

  .language-switcher {
    margin-left: 0;
  }

  .intro::before {
    margin-bottom: 22px;
  }

  .intro::after {
    width: 66px;
    height: 66px;
    top: 48px;
    opacity: 0.35;
  }

  .intro h1,
  .page-title {
    font-size: 42px;
  }

  .intro p,
  .page-description,
  .article-body {
    font-size: 16px;
  }

  .post-item {
    padding: 25px 0 26px;
  }

  .post-item::before,
  .post-item::after,
  .empty-state::before {
    display: none;
  }

  .empty-state {
    padding-left: 0;
  }

  .post-item:hover {
    transform: none;
  }

  .post-item h2 {
    font-size: 22px;
  }

  .post-item h2 a::after {
    display: none;
  }

  .project-showcase {
    padding: 22px 0 26px;
  }

  .project-showcase-head {
    display: block;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 112px;
  }

  .project-card img {
    max-width: 138px;
    max-height: 32px;
  }

  .article-header h1 {
    font-size: 38px;
  }

  .site-footer {
    flex-direction: column;
    margin-top: 64px;
  }
}
