/* =========================================================
   FURKAN KAPUKAYA — BLOG
   Dark editorial system built on top of the portfolio tokens.
   ========================================================= */

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  overflow-y: auto;
  background: var(--smoky-black);
}
body {
  overflow-x: clip;
  overflow-y: visible;
  background: var(--smoky-black);
}

.blog-shell {
  position: relative;
  min-height: 100vh;
  padding: 34px 24px 72px;
  overflow: clip;
  background:
    radial-gradient(circle at 12% 4%, hsla(45, 100%, 72%, .075), transparent 28rem),
    radial-gradient(circle at 88% 18%, hsla(35, 100%, 68%, .045), transparent 30rem),
    var(--smoky-black);
  color: var(--light-gray);
  font-family: var(--ff-poppins);
}

.blog-shell::before,
.blog-shell::after {
  content: "";
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: .13;
  z-index: 0;
}
.blog-shell::before { top: -220px; left: -150px; background: var(--orange-yellow-crayola); }
.blog-shell::after { right: -220px; bottom: -220px; background: var(--vegas-gold); }

.blog-wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
}

/* Top navigation */
.blog-topbar {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 42px;
  padding: 10px 0;
}
.blog-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white-2);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.35px;
}
.blog-brand span { display: inline; color: var(--orange-yellow-crayola); }
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 14px;
  color: var(--light-gray);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--jet);
  border-radius: 12px;
  background: hsla(240, 2%, 13%, .72);
  box-shadow: 0 8px 28px hsla(0, 0%, 0%, .12);
  transition: transform .22s ease, color .22s ease, border-color .22s ease, background .22s ease;
}
.blog-back:hover {
  transform: translateY(-2px);
  color: var(--orange-yellow-crayola);
  border-color: hsla(45, 100%, 72%, .5);
  background: hsla(240, 2%, 15%, .94);
}


.blog-top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}
.blog-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--jet);
  border-radius: 12px;
  background: hsla(240, 2%, 13%, .72);
  box-shadow: 0 8px 28px hsla(0, 0%, 0%, .12);
}
.lang-btn {
  min-width: 38px;
  min-height: 32px;
  padding: 5px 9px;
  color: hsla(0, 0%, 84%, .6);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.lang-btn:hover {
  color: var(--white-2);
  background: hsla(0, 0%, 100%, .035);
}
.lang-btn.active {
  color: hsl(240, 2%, 10%);
  border-color: hsla(45, 100%, 78%, .82);
  background: linear-gradient(135deg, var(--orange-yellow-crayola), var(--vegas-gold));
  box-shadow: 0 5px 16px hsla(45, 100%, 72%, .12);
}

/* Blog landing page */
.blog-hero { max-width: 820px; margin: 18px 0 34px; }
.blog-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--orange-yellow-crayola);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.65px;
  text-transform: uppercase;
}
.blog-kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}
.blog-hero h1 {
  margin: 10px 0 14px;
  color: var(--white-2);
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -2px;
}
.blog-hero p {
  max-width: 760px;
  color: var(--light-gray-70);
  font-size: 15px;
  line-height: 1.85;
}

.blog-categories {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 24px 0 34px;
}
.blog-categories a,
.blog-categories .filter-btn {
  cursor: pointer;
  padding: 8px 13px;
  color: var(--light-gray);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--jet);
  border-radius: 999px;
  background: hsla(240, 2%, 13%, .6);
  transition: .22s ease;
}
.blog-categories a:hover,
.blog-categories .filter-btn:hover,
.blog-categories .filter-btn.active {
  color: var(--smoky-black);
  border-color: var(--orange-yellow-crayola);
  background: var(--orange-yellow-crayola);
  box-shadow: 0 8px 24px hsla(45, 100%, 72%, .12);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.blog-card {
  position: relative;
  display: flex;
  min-height: 100%;
  overflow: hidden;
  color: inherit;
  border: 1px solid var(--jet);
  border-radius: 18px;
  background:
    linear-gradient(145deg, hsla(240, 1%, 19%, .72), hsla(240, 2%, 11%, .92));
  box-shadow: 0 10px 30px hsla(0, 0%, 0%, .14);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.blog-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsla(45, 100%, 72%, .45), transparent);
  opacity: .5;
}
.blog-card:hover {
  transform: translateY(-6px);
  border-color: hsla(45, 54%, 58%, .55);
  box-shadow: 0 20px 45px hsla(0, 0%, 0%, .22);
}
.blog-card-body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.blog-card .meta {
  color: var(--orange-yellow-crayola);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .85px;
  text-transform: uppercase;
}
.blog-card h2 {
  margin: 10px 0 10px;
  color: var(--white-2);
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: -.25px;
}
.blog-card p { color: var(--light-gray-70); font-size: 12.5px; line-height: 1.72; }
.blog-card .blog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.blog-card .blog-tags span {
  display: inline-flex;
  padding: 4px 8px;
  color: hsla(0, 0%, 84%, .72);
  font-size: 9px;
  border: 1px solid hsla(0, 0%, 35%, .65);
  border-radius: 999px;
  background: hsla(0, 0%, 100%, .018);
}
.blog-card .blog-read {
  margin-top: auto;
  padding-top: 18px;
  color: var(--orange-yellow-crayola);
  font-size: 12px;
  font-weight: 600;
}
.blog-card.is-hidden { display: none; }

/* =========================================================
   ARTICLE PAGE
   ========================================================= */

/* Keep article pages on a single document scrollbar. */
body.blog-article-page {
  height: auto !important;
  max-height: none !important;
  overflow-x: clip !important;
  overflow-y: visible !important;
}

/* The portfolio stylesheet globally hides article elements. */
.blog-shell .blog-article {
  display: block !important;
  width: 100%;
  margin: 0 auto;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 9999;
  height: 3px;
  pointer-events: none;
  background: hsla(0, 0%, 100%, .025);
}
.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--orange-yellow-crayola), hsl(35, 100%, 68%));
  box-shadow: 0 0 16px hsla(45, 100%, 72%, .35);
  will-change: transform;
}

.article-hero-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 4px 0 30px;
  border: 1px solid hsla(0, 0%, 28%, .9);
  border-radius: 26px;
  background:
    linear-gradient(135deg, hsla(45, 100%, 72%, .055), transparent 34%),
    linear-gradient(145deg, hsl(240, 2%, 14%), hsl(240, 2%, 10%));
  box-shadow: 0 28px 80px hsla(0, 0%, 0%, .25);
}
.article-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, hsla(45, 100%, 72%, .08) 1px, transparent 1px),
    linear-gradient(hsla(45, 100%, 72%, .06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to right, rgba(0,0,0,.46), transparent 55%);
  opacity: .3;
}
.article-hero-inner { position: relative; z-index: 2; max-width: 930px; padding: clamp(28px, 5vw, 58px); }
.article-hero-accent {
  position: absolute;
  right: -60px;
  top: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(45, 100%, 72%, .17), transparent 68%);
  filter: blur(2px);
  pointer-events: none;
}
.article-hero-accent::after {
  content: "</>";
  position: absolute;
  right: 85px;
  top: 110px;
  color: hsla(45, 100%, 72%, .09);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 86px;
  font-weight: 700;
  letter-spacing: -12px;
}

.blog-breadcrumbs {
  margin-bottom: 24px;
  color: hsla(0, 0%, 84%, .52);
  font-size: 11px;
  line-height: 1.6;
}
.blog-breadcrumbs a { display: inline; color: hsla(0, 0%, 84%, .68); transition: color .2s ease; }
.blog-breadcrumbs a:hover { color: var(--orange-yellow-crayola); }

.article-hero-card .blog-kicker { margin-bottom: 13px; }
.article-hero-card h1 {
  max-width: 860px;
  margin: 0;
  color: var(--white-2);
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 600;
  line-height: 1.11;
  letter-spacing: -1.85px;
  text-wrap: balance;
}
.blog-meta.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0 0;
  color: inherit;
  font-size: inherit;
}
.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: hsla(0, 0%, 84%, .78);
  font-size: 11px;
  border: 1px solid hsla(0, 0%, 36%, .72);
  border-radius: 999px;
  background: hsla(0, 0%, 100%, .028);
}
.article-meta-item i { color: var(--orange-yellow-crayola); font-size: 10px; }

.article-reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
  align-items: start;
  gap: 0;
}
.article-main-column { min-width: 0; }


.article-body {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: clamp(25px, 4.5vw, 48px) !important;
  color: hsl(0, 0%, 82%) !important;
  font-size: 16px !important;
  font-weight: 300;
  line-height: 1.92 !important;
  border: 1px solid hsla(0, 0%, 28%, .9);
  border-radius: 22px;
  background:
    linear-gradient(180deg, hsla(240, 2%, 14%, .91), hsla(240, 2%, 11%, .97));
  box-shadow: 0 22px 64px hsla(0, 0%, 0%, .2);
}
.article-body::before {
  content: "";
  position: absolute;
  inset: 0 24% auto 24%;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsla(45, 100%, 72%, .5), transparent);
}
.article-body > p:first-child {
  margin-bottom: 30px !important;
  color: hsl(0, 0%, 91%) !important;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.82;
}
.article-body > p:first-child::first-letter {
  color: var(--orange-yellow-crayola);
  font-size: 1.15em;
}
.article-body p {
  display: block !important;
  margin: 0 0 20px !important;
  color: hsl(0, 0%, 81%) !important;
}
.article-body h2 {
  position: relative;
  display: block !important;
  scroll-margin-top: 28px;
  margin: 46px 0 15px !important;
  padding-top: 8px;
  color: var(--white-2) !important;
  font-size: 25px !important;
  font-weight: 600;
  line-height: 1.35 !important;
  letter-spacing: -.55px;
}
.article-body h2:first-of-type { margin-top: 36px !important; }
.article-body h2::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 15px;
  width: 4px;
  height: 22px;
  border-radius: 99px;
  background: linear-gradient(var(--orange-yellow-crayola), var(--vegas-gold));
  box-shadow: 0 0 14px hsla(45, 100%, 72%, .12);
}
.article-body h3 {
  display: block !important;
  scroll-margin-top: 28px;
  margin: 31px 0 10px !important;
  color: var(--white-2) !important;
  font-size: 19px !important;
  font-weight: 600;
  line-height: 1.45 !important;
}
.article-body strong { color: var(--white-2) !important; font-weight: 600; }
.article-body em { color: hsl(0, 0%, 90%); }
.article-body a {
  display: inline !important;
  color: var(--orange-yellow-crayola) !important;
  text-decoration: underline;
  text-decoration-color: hsla(45, 100%, 72%, .36);
  text-underline-offset: 3px;
}
.article-body a:hover { text-decoration-color: currentColor; }

.article-body ul,
.article-body ol {
  display: block !important;
  margin: 8px 0 24px !important;
  padding: 2px 0 2px 22px !important;
}
.article-body li {
  position: relative;
  display: list-item !important;
  margin-bottom: 10px !important;
  padding-left: 4px;
  color: hsl(0, 0%, 81%) !important;
  line-height: 1.75;
}
.article-body ul li { list-style: disc !important; }
.article-body ol li { list-style: decimal !important; }
.article-body li::marker { color: var(--orange-yellow-crayola); font-weight: 600; }

.article-body blockquote {
  position: relative;
  margin: 28px 0;
  padding: 20px 22px 20px 50px;
  color: hsl(0, 0%, 91%);
  font-size: 16px;
  line-height: 1.8;
  border: 1px solid hsla(45, 100%, 72%, .2);
  border-left: 3px solid var(--orange-yellow-crayola);
  border-radius: 0 14px 14px 0;
  background: hsla(45, 100%, 72%, .035);
}
.article-body blockquote::before {
  content: "“";
  position: absolute;
  left: 17px;
  top: 2px;
  color: var(--orange-yellow-crayola);
  font-family: Georgia, serif;
  font-size: 48px;
  opacity: .85;
}

.article-body code {
  padding: 2px 6px;
  color: hsl(45, 100%, 80%);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .9em;
  border: 1px solid hsla(0, 0%, 35%, .75);
  border-radius: 6px;
  background: hsl(240, 2%, 9%);
}
.article-body pre {
  position: relative;
  overflow: auto;
  margin: 25px 0 30px;
  padding: 48px 20px 20px;
  color: hsl(0, 0%, 88%);
  line-height: 1.7;
  border: 1px solid hsla(0, 0%, 32%, .92);
  border-radius: 14px;
  background: hsl(240, 2%, 8%);
  box-shadow: inset 0 1px 0 hsla(0, 0%, 100%, .025);
}
.article-body pre::before {
  content: "CODE";
  position: absolute;
  left: 18px;
  top: 14px;
  color: hsla(0, 0%, 84%, .35);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.2px;
}
.article-body pre code {
  padding: 0;
  color: hsl(0, 0%, 88%);
  font-size: 12.5px;
  border: 0;
  background: transparent;
}
.code-copy-btn {
  position: absolute;
  right: 10px;
  top: 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  color: hsla(0, 0%, 84%, .62);
  font-size: 9px;
  border: 1px solid hsla(0, 0%, 34%, .85);
  border-radius: 8px;
  background: hsl(240, 2%, 12%);
  transition: .2s ease;
}
.code-copy-btn:hover,
.code-copy-btn.copied { color: var(--orange-yellow-crayola); border-color: hsla(45, 100%, 72%, .35); }

.article-body img {
  max-width: 100%;
  height: auto;
  margin: 28px auto;
  border: 1px solid var(--jet);
  border-radius: 15px;
  box-shadow: 0 18px 42px hsla(0, 0%, 0%, .22);
}
.article-body hr { height: 1px; margin: 35px 0; border: 0; background: linear-gradient(90deg, transparent, var(--jet), transparent); }


.map-link { color: var(--light-gray) !important; text-decoration: none; transition: var(--transition-1); }
.map-link:hover { color: var(--orange-yellow-crayola) !important; }
.featured-projects-title { font-size: 26px !important; }

@keyframes page-enter-subtle {
  from { opacity: .985; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}
body { animation: page-enter-subtle 160ms ease-out both; }

@media (max-width: 980px) {
  .article-reading-grid { grid-template-columns: minmax(0, 820px); }
}

@media (max-width: 800px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-hero-card { border-radius: 20px; }
  .article-body h2::before { left: -14px; }
}

@media (max-width: 580px) {
  .blog-shell { padding: 18px 14px 48px; }
  .blog-topbar { flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
  .blog-brand { font-size: 17px; }
  .blog-top-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .blog-language-switch { padding: 3px; border-radius: 10px; }
  .lang-btn { min-width: 36px; min-height: 30px; padding: 4px 8px; font-size: 9.5px; }
  .blog-back { min-height: 38px; padding: 7px 10px; font-size: 11px; border-radius: 10px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card h2 { font-size: 17px; }
  .blog-hero h1 { font-size: 42px; }

  .article-hero-card { margin-bottom: 16px; border-radius: 18px; }
  .article-hero-inner { padding: 24px 20px 26px; }
  .article-hero-accent { width: 220px; height: 220px; right: -90px; top: -80px; }
  .article-hero-accent::after { display: none; }
  .blog-breadcrumbs { margin-bottom: 18px; font-size: 9.5px; }
  .article-hero-card h1 { font-size: clamp(30px, 9.5vw, 40px); line-height: 1.12; letter-spacing: -1.2px; }
  .blog-meta.article-meta-row { margin-top: 18px; }
  .article-meta-item { font-size: 9.5px; }

  .article-body { padding: 25px 20px !important; font-size: 14.5px !important; line-height: 1.86 !important; border-radius: 17px; }
  .article-body > p:first-child { font-size: 16px; line-height: 1.75; }
  .article-body h2 { margin-top: 38px !important; font-size: 21px !important; }
  .article-body h2::before { left: -10px; top: 13px; width: 3px; height: 19px; }
  .article-body h3 { font-size: 17px !important; }
  .article-body pre { margin-left: -4px; margin-right: -4px; padding: 46px 15px 16px; }
  .article-body pre code { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { animation: none; }
  .blog-card, .blog-back, .lang-btn { transition: none; }
}
