/* =============================================================
   korayustundag.com.tr — main stylesheet
   Dark theme · amber accent · plain CSS, no framework
   ============================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Background layers */
  --bg:            #100d08;
  --bg-soft:       #14100a;
  --surface:       #1a150e;
  --surface-2:     #221b11;
  --surface-3:     #2b2216;

  /* Text */
  --text:          #f2ede4;
  --text-soft:     #cdc3b2;
  --text-muted:    #a1978a;
  --text-faint:    #7a7266;

  /* Accent */
  --accent:        #f59e0b;
  --accent-bright: #fbbf24;
  --accent-deep:   #b45309;
  --accent-a08:    rgba(245, 158, 11, .08);
  --accent-a14:    rgba(245, 158, 11, .14);
  --accent-a30:    rgba(245, 158, 11, .30);

  /* Borders */
  --border:        rgba(245, 158, 11, .12);
  --border-soft:   rgba(255, 255, 255, .06);
  --border-strong: rgba(245, 158, 11, .34);

  /* Semantic */
  --danger:        #f87171;
  --success:       #4ade80;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  /* Scale */
  --container: 1160px;
  --measure:   72ch;
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 12px 32px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 26px 60px -20px rgba(0, 0, 0, .85);
  --glow:      0 0 0 1px var(--border-strong), 0 18px 44px -18px rgba(245, 158, 11, .28);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-fast: 140ms var(--ease);
  --t:      240ms var(--ease);
}

/* ---------- 2. Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.7;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* A very faint wash across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(245, 158, 11, .07), transparent 70%),
    radial-gradient(700px 460px at 4% 8%,  rgba(180, 83, 9, .06),  transparent 70%);
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -.03em;
  font-weight: 700;
  color: #fff;
}
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-bright); }

code, pre, kbd, time { font-family: var(--font-mono); }

code {
  font-size: .86em;
  background: var(--accent-a08);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .1em .38em;
  color: var(--accent-bright);
  overflow-wrap: break-word;
}

button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: #100d08; }

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

.icon { width: 1em; height: 1em; flex: none; }

/* Screen-reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--accent);
  color: #100d08;
  font-weight: 600;
  padding: .7rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top var(--t);
}
.skip-link:focus { top: 0; color: #100d08; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
  position: relative;
  z-index: 1;
}

/* Any wide block scrolls inside itself rather than the page */
.table-scroll { overflow-x: auto; max-width: 100%; }

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 13, 8, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  background: rgba(16, 13, 8, .9);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.brand { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.brand:hover { color: var(--text); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--accent-bright), var(--accent-deep));
  color: #100d08;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 6px 18px -8px rgba(245, 158, 11, .8);
}
.brand-mark.small { width: 26px; height: 26px; font-size: .82rem; border-radius: 8px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: .98rem; letter-spacing: -.02em; }
.brand-sub {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-faint);
  letter-spacing: .02em;
}

.nav { display: flex; align-items: center; gap: 1.75rem; }

.nav-list {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-list a {
  display: block;
  position: relative;
  padding: .5rem .8rem;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: .93rem;
  font-weight: 500;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-list a:hover { color: var(--text); background: var(--accent-a08); }
.nav-list a.is-active { color: var(--accent-bright); }
.nav-list a.is-active::after {
  content: "";
  position: absolute;
  left: .8rem; right: .8rem; bottom: .2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* Hamburger */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0;
  place-items: center;
  gap: 5px;
}
.nav-toggle-bar {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: transform var(--t), opacity var(--t-fast);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .78rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: transform var(--t-fast), background var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t), color var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn .icon { transition: transform var(--t-fast); }

.btn-primary {
  background: linear-gradient(160deg, var(--accent-bright), var(--accent));
  color: #100d08;
  box-shadow: 0 10px 26px -12px rgba(245, 158, 11, .75);
}
.btn-primary:hover {
  color: #100d08;
  box-shadow: 0 14px 32px -12px rgba(245, 158, 11, .95);
}
.btn-primary:hover .icon { transform: translateX(3px); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-soft);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-sm { padding: .5rem .9rem; font-size: .86rem; border-radius: 9px; }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -30%; right: -10%;
  width: 780px; height: 780px;
  background: radial-gradient(circle, rgba(245, 158, 11, .13), transparent 62%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 1.4rem;
  padding: .34rem .85rem .34rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-a08);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-a30);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, .32); }
  50%      { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
}

.hero h1 {
  font-size: clamp(2.2rem, 5.6vw, 3.9rem);
  letter-spacing: -.042em;
  margin-bottom: 1.3rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .08em;
  height: .1em;
  background: var(--accent-a30);
  border-radius: 2px;
}

.hero-lede {
  max-width: 54ch;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: var(--text-soft);
  margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.4rem; }

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  margin: 0; padding: 0;
}
.hero-tags li {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-muted);
  padding: .3rem .65rem;
  border: 1px dashed var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, .015);
}

/* Terminal graphic */
.hero-terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-4deg) rotateX(2deg);
  transition: transform 600ms var(--ease);
}
.hero-terminal:hover { transform: perspective(1400px) rotateY(0) rotateX(0); }

.term-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem .95rem;
  background: rgba(0, 0, 0, .28);
  border-bottom: 1px solid var(--border-soft);
}
.term-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
}
.term-dot:first-child { background: var(--accent-deep); }
.term-title {
  margin-left: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-faint);
}

.term-body {
  margin: 0;
  padding: 1.2rem 1.3rem 1.5rem;
  font-size: clamp(.76rem, 1.1vw, .85rem);
  line-height: 1.95;
  overflow-x: auto;
}
.term-body code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.term-body .l { display: block; color: var(--text); }
.term-body .p { color: var(--accent); margin-right: .5rem; font-weight: 700; }
.term-body .o { display: block; color: var(--text-muted); }
.caret {
  display: inline-block;
  width: 7px; height: 1em;
  margin-left: 3px;
  vertical-align: -.15em;
  background: var(--accent);
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 6. Section scaffolding ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; position: relative; }
.section-alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--border-soft);
}
.section-articles { padding-top: clamp(2rem, 4vw, 3rem); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--accent);
  letter-spacing: .06em;
  margin: 0 0 .5rem;
}
.section-head h1,
.section-head h2,
.about-copy h2,
.contact-copy h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  letter-spacing: -.035em;
}
.section-desc {
  margin: .7rem 0 0;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: .98rem;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .92rem;
  font-weight: 600;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--accent-a30);
}
.link-more:hover { border-bottom-color: var(--accent); }
.link-more .icon { transition: transform var(--t-fast); }
.link-more:hover .icon { transform: translateX(3px); }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.6rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--text-faint);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-hidden] { color: var(--accent-deep); }

/* ---------- 7. Filter bar ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border-soft);
}

.search-field {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 1 1 260px;
  max-width: 380px;
  padding: .58rem .8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.search-field:focus-within {
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-a08);
}
.search-field .icon { font-size: 1.05rem; color: var(--text-faint); }
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
  outline: none;
}
.search-field input::placeholder { color: var(--text-faint); }
.search-field input::-webkit-search-cancel-button { filter: invert(.7) sepia(1) hue-rotate(-15deg); }

.search-submit {
  flex: none;
  border: 0;
  background: var(--accent-a14);
  color: var(--accent-bright);
  font-size: .8rem;
  font-weight: 600;
  padding: .3rem .7rem;
  border-radius: 7px;
  transition: background var(--t-fast), color var(--t-fast);
}
.search-submit:hover { background: var(--accent); color: #100d08; }

.search-hint {
  font-size: .68rem;
  color: var(--text-faint);
  border: 1px solid var(--border-soft);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: .05rem .35rem;
  background: rgba(0, 0, 0, .3);
}

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: .84rem;
  font-weight: 500;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); background: var(--accent-a08); }
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #100d08;
  font-weight: 600;
}
.chip-count {
  font-family: var(--font-mono);
  font-size: .68rem;
  opacity: .65;
}

/* ---------- 8. Cards (articles and projects share these) ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  transition: transform var(--t), border-color var(--t), box-shadow var(--t), background var(--t);
  overflow: hidden;
}
.card::after {
  /* thin accent line along the top edge, revealed on hover */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--t);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}
.card:hover::after { opacity: .8; }
.card:focus-within { border-color: var(--border-strong); }

/* Invisible layer that makes the whole card clickable */
.card-link { position: absolute; inset: 0; z-index: 2; }
.card-link:focus-visible { outline-offset: -4px; }

.card-body { padding: 1.5rem 1.6rem 1.6rem; display: flex; flex-direction: column; flex: 1; }

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-faint);
  margin-bottom: .85rem;
  letter-spacing: .01em;
}
.card-meta .sep { color: var(--accent-deep); }
.card-meta time { white-space: nowrap; }

.meta-draft {
  color: var(--accent-bright);
  background: var(--accent-a14);
  border-radius: 4px;
  padding: 0 .35rem;
  font-weight: 700;
}

.card-title {
  font-size: 1.16rem;
  line-height: 1.35;
  margin-bottom: .7rem;
  transition: color var(--t-fast);
}
.card:hover .card-title { color: var(--accent-bright); }
.card-title a { color: inherit; position: relative; z-index: 3; }

.card-excerpt {
  color: var(--text-muted);
  font-size: .93rem;
  line-height: 1.68;
  margin-bottom: 1.2rem;
}
.card-excerpt code { font-size: .82em; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  margin: auto 0 0; padding: 0;
}
.tags li {
  font-family: var(--font-mono);
  font-size: .7rem;
  padding: .22rem .55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-a08);
}
.tags li a { color: inherit; }

/* Featured article */
.card-featured {
  flex-direction: row;
  align-items: stretch;
  margin-bottom: 1.4rem;
  background:
    radial-gradient(700px 320px at 90% 0%, rgba(245, 158, 11, .09), transparent 65%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border-color: var(--border);
}
.card-featured .card-body { padding: clamp(1.6rem, 3vw, 2.4rem); justify-content: center; }
.card-featured .card-title { font-size: clamp(1.35rem, 2.6vw, 1.85rem); letter-spacing: -.03em; }
.card-featured .card-excerpt { font-size: 1rem; max-width: 60ch; }

.badge {
  position: absolute;
  top: 1.1rem; right: 1.1rem;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .28rem .6rem;
  border-radius: 999px;
  background: var(--accent);
  color: #100d08;
  font-weight: 700;
}

.card-visual {
  flex: 0 0 40%;
  display: flex;
  align-items: center;
  padding: 1.6rem 1.6rem 1.6rem 0;
  border-left: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, .22);
  overflow: hidden;
}
.card-visual pre {
  margin: 0;
  padding-left: 1.6rem;
  font-size: .78rem;
  line-height: 1.9;
  color: var(--text-muted);
  overflow-x: auto;
}
.card-visual code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.3rem;
}
.archive-grid { margin-bottom: 2.5rem; }

.card.is-hidden { display: none; }

.no-results {
  margin: 2.5rem 0 0;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--accent-a08);
}
.linkish {
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}

/* ---------- 9. Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.3rem;
}
.card-project { padding: 1.5rem 1.6rem; }

.project-top { display: flex; align-items: center; gap: .8rem; margin-bottom: .9rem; }
.project-icon {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--accent-a14);
  border: 1px solid var(--border);
  color: var(--accent);
}
.project-icon svg { width: 19px; height: 19px; }
.card-project .card-title { font-size: 1.05rem; margin: 0; }

.project-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
  font-size: .82rem;
}
.repo-meta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--text-faint);
}
.lang-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lang, var(--accent));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .05);
}
.repo-link { font-weight: 600; font-size: .84rem; }

/* ---------- 10. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-copy p { color: var(--text-soft); max-width: 56ch; }

.about-facts {
  display: grid;
  gap: .7rem;
  margin-top: 2rem;
}
.fact {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .8rem 1rem;
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface);
}
.fact-label {
  flex: 0 0 90px;
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-faint);
}
.fact-value { font-size: .93rem; font-weight: 500; color: var(--text); }

.skills {
  display: grid;
  gap: 1.4rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
}
.skill-group h3 {
  font-size: .76rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--accent);
  margin-bottom: .7rem;
}
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  list-style: none;
  margin: 0; padding: 0;
}
.pill-list li {
  font-size: .84rem;
  padding: .32rem .72rem;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text-soft);
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.pill-list li:hover {
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-2px);
}

/* ---------- 11. Contact ---------- */
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 12% 0%, rgba(245, 158, 11, .1), transparent 62%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
}
.contact-copy p { color: var(--text-soft); max-width: 46ch; margin-bottom: 1.8rem; }

.social-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  list-style: none;
  margin: 0; padding: 0;
}
.social-list a {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  height: 100%;
  padding: .95rem 1.1rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, .22);
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.social-list a:hover {
  border-color: var(--border-strong);
  background: var(--accent-a08);
  transform: translateY(-2px);
}
.social-list .icon { font-size: 1.1rem; color: var(--accent); margin-bottom: .35rem; }
.social-name { font-size: .93rem; font-weight: 600; }
.social-handle {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 12. Article page ---------- */
.article-head {
  position: relative;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}

.article-title {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  letter-spacing: -.04em;
  max-width: 24ch;
  margin-bottom: 1.1rem;
}

.article-lede {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--text-soft);
  max-width: 60ch;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-faint);
}
.article-meta .sep { color: var(--accent-deep); }

.article-tags { margin-top: 1.3rem; }

.draft-banner {
  padding: .8rem 1.1rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-strong);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  background: var(--accent-a08);
  color: var(--text-soft);
  font-size: .9rem;
}

.article-container { padding-block: clamp(2rem, 4vw, 3.2rem); }

/* ---------- 13. Long-form prose ---------- */
.prose {
  max-width: var(--measure);
  color: var(--text-soft);
  font-size: 1.04rem;
  line-height: 1.78;
}

.prose > * + * { margin-top: 1.15rem; }

.prose h2 {
  margin-top: 2.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border-soft);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -.03em;
}
.prose h3 {
  margin-top: 2.1rem;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--text);
}
.prose h4 {
  margin-top: 1.7rem;
  font-size: 1.02rem;
  color: var(--accent-bright);
}
.prose h2:first-child, .prose h3:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); }

.prose a {
  border-bottom: 1px solid var(--accent-a30);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.prose a:hover { border-bottom-color: var(--accent); }

.prose ul, .prose ol { padding-left: 1.4rem; margin-block: 1.15rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--accent); }
.prose ul ul, .prose ol ol { margin-block: .5rem; }

.prose blockquote {
  margin: 1.6rem 0;
  padding: .2rem 0 .2rem 1.3rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose hr {
  margin: 2.4rem 0;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

.prose img {
  margin: 1.8rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
}

/* Code blocks */
.prose .code-block,
.code-block {
  position: relative;
  margin: 1.6rem 0;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .32);
  overflow-x: auto;
  font-size: .855rem;
  line-height: 1.75;
  color: var(--text-soft);
  tab-size: 4;
}
.code-block code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}
/* Copy button, injected by main.js — only appears on hover or focus */
.code-copy {
  position: absolute;
  top: .5rem; right: .55rem;
  padding: .2rem .6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(16, 13, 8, .92);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .68rem;
  opacity: 0;
  transition: opacity var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.code-block:hover .code-copy,
.code-copy:focus-visible { opacity: 1; }
.code-copy:hover { color: var(--accent-bright); border-color: var(--border-strong); }
.code-copy.is-copied { color: var(--success); border-color: rgba(74, 222, 128, .45); opacity: 1; }

/* A language label sits where the copy button goes, so shift it left */
.code-block[data-lang] .code-copy { right: 4.2rem; }

/* Language label in the corner */
.code-block[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 0; right: 0;
  padding: .18rem .6rem;
  border-bottom-left-radius: var(--radius-sm);
  background: var(--accent-a14);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .66rem;
  text-transform: lowercase;
  letter-spacing: .04em;
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  margin: 0;
}
.prose .table-scroll {
  margin: 1.6rem 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .18);
}
.prose th, .prose td {
  padding: .7rem .95rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.prose thead th {
  background: var(--accent-a08);
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: rgba(255, 255, 255, .02); }

/* ---------- 14. Article footer, share, prev/next ---------- */
.article-foot {
  max-width: var(--measure);
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border-soft);
}

.share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.2rem;
}
.share-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  margin-right: .3rem;
}
.share-btn {
  padding: .38rem .8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 500;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.share-btn:hover {
  color: var(--accent-bright);
  border-color: var(--border-strong);
  background: var(--accent-a08);
}
.share-btn.is-copied { color: var(--success); border-color: rgba(74, 222, 128, .4); }

.article-updated { font-size: .86rem; color: var(--text-faint); margin: 0; }

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: var(--measure);
  margin-top: 2.5rem;
}
.article-nav-link {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.article-nav-link:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  transform: translateY(-2px);
}
.article-nav-link.is-next { text-align: right; }
.article-nav-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--accent);
  letter-spacing: .04em;
}
.article-nav-title { font-size: .95rem; font-weight: 600; line-height: 1.4; }

.section-related { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* ---------- 15. Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border-soft);
}
.page-btn {
  padding: .55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: .88rem;
  font-weight: 600;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.page-btn:hover { border-color: var(--border-strong); color: var(--accent-bright); background: var(--surface-2); }
.page-btn.is-disabled { opacity: .32; pointer-events: none; }

.page-numbers { display: flex; flex-wrap: wrap; gap: .3rem; }
.page-num {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding-inline: .5rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .84rem;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.page-num:hover { color: var(--text); background: var(--accent-a08); border-color: var(--border); }
.page-num.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #100d08;
  font-weight: 700;
}

/* ---------- 16. 404 ---------- */
.section-error { padding-block: clamp(4rem, 10vw, 8rem); }
.error-inner { max-width: 640px; }
.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 1rem;
  color: transparent;
  background: linear-gradient(160deg, var(--accent-bright), transparent 78%);
  -webkit-background-clip: text;
  background-clip: text;
}
.section-error h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: 1rem; }
.error-lede { color: var(--text-muted); max-width: 48ch; margin-bottom: 2rem; }

.error-suggestions { margin-top: 3rem; }
.error-suggestions ul { list-style: none; margin: 0; padding: 0; }
.error-suggestions li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.error-suggestions li span {
  font-family: var(--font-mono);
  font-size: .74rem;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ---------- 17. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
  padding: 2.2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: .86rem;
  color: var(--text-soft);
}
.footer-note { margin: 0; font-size: .82rem; color: var(--text-faint); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.footer-nav a { font-size: .85rem; color: var(--text-muted); }
.footer-nav a:hover { color: var(--accent); }

/* ---------- 18. Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 19. Responsive ---------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-terminal { transform: none; max-width: 520px; }
  .about-grid, .contact-card { grid-template-columns: 1fr; }
  .card-featured { flex-direction: column; }
  .card-visual {
    flex: none;
    border-left: 0;
    border-top: 1px solid var(--border-soft);
    padding: 1.3rem 1.6rem;
  }
  .card-visual pre { padding-left: 0; }
  .article-title { max-width: none; }
}

@media (max-width: 780px) {
  html { scroll-padding-top: 80px; }

  .nav-toggle { display: grid; }

  .nav {
    position: fixed;
    inset: 64px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.2rem clamp(1.15rem, 4vw, 2.5rem) 1.6rem;
    background: rgba(16, 13, 8, .97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t), transform var(--t), visibility var(--t);
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }

  .nav-list { flex-direction: column; align-items: stretch; gap: .2rem; }
  .nav-list a { padding: .8rem 1rem; font-size: 1rem; border-radius: 10px; }
  .nav-list a.is-active { background: var(--accent-a08); }
  .nav-list a.is-active::after { display: none; }
  .nav-cta { justify-content: center; padding: .7rem 1rem; }

  .filter-bar { align-items: stretch; }
  .search-field { max-width: none; }
  .search-hint { display: none; }

  .section-head { align-items: flex-start; margin-bottom: 2rem; }
  .social-list { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; text-align: left; }

  .article-nav { grid-template-columns: 1fr; }
  .article-nav-link.is-next { text-align: left; }
  .pagination { justify-content: center; }
}

@media (max-width: 460px) {
  body { font-size: 16px; }
  .brand-text strong { font-size: .92rem; }
  .brand-sub { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .card-body { padding: 1.25rem 1.25rem 1.35rem; }
  .article-grid, .project-grid { grid-template-columns: 1fr; }
  .fact { flex-direction: column; gap: .15rem; }
  .fact-label { flex: none; }
  .prose { font-size: 1rem; }
  .code-block { padding: 1rem; font-size: .8rem; }
}

/* ---------- 20. Accessibility and print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-terminal { transform: none; }
}

@media print {
  body { background: #fff; color: #000; }
  body::before, .hero-glow, .site-header, .filter-bar, .nav-toggle,
  .share, .article-nav, .section-related, .breadcrumb { display: none !important; }
  .card { break-inside: avoid; border-color: #ccc; background: none; }
  .prose { max-width: none; color: #000; }
  .code-block { background: #f5f5f5; border-color: #ddd; color: #000; }
  a { color: #000; text-decoration: underline; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
